Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / timer then die

Author
Message
fpscwillcore
User Banned
Posted: 28th Aug 2012 09:36
i want a timer that can show the hud
and after six minutes i die with an explosion sound
Fenwolf
13
Years of Service
User Offline
Joined: 24th Oct 2011
Location: United States
Posted: 28th Aug 2012 20:29
I won't address the issue of the HUD here. Others in the forums would be of greater help along those lines.

As for offing your player, you need to set up a timer. I like using dynamic lights for attaching scripts. Set a light into your map. Make sure it is set as dynamic. Change its color to ffffff. This is black (invisible) light.

Name the script below something like killplayer.fpi and set the script as the Main in the light entity. Note that you'll have to set the path to your intended explosion sound following the plrsound= command. Also note that I used the plrsound= command instead of sound= because the sound will seem closer to the player rather than to the entity to which it is attached. Hope this helps.

;Artificial Intelligence Script

;Header

desc = kill player after delay


;Triggers

;get our timer started
:state=0:etimerstart,state=1

;check our timer-if time is up play the big bang.
:state=1,etimergreater=360000:etimerstart,plrsound=path to your big bang sound

;give a delay sufficient for the sound to play fully then off our player - subtracting 1000 from the player health should be like exposing Superman to kryptonite
:state=2,etimergreater=1000:plrsubhealth=1000,suspend


;End of Script

Life is about living.
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 29th Aug 2012 00:10
Quote: "i want a timer that can show the hud
and after six minutes i die with an explosion sound "

I suspect that is not all and there should also be a way for the player to stop the timer. Or is the goal of this setup only to frustrate the player?

In case you find my grammar and spelling weird ---> native German speaker ^^
fpscwillcore
User Banned
Posted: 2nd Sep 2012 01:36
thanks

Login to post a reply

Server time is: 2024-11-23 22:30:57
Your offset time is: 2024-11-23 22:30:57