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 Help

Author
Message
newguy035
14
Years of Service
User Offline
Joined: 27th Nov 2009
Location:
Posted: 7th Aug 2010 20:22
Hello,

I am working on a game with some levels in which I would like to incorporate timers. However, I am fairly new, and have no clue how to get these timers in the game. So here is what I am looking for, ideally: 1) a script for a countdown timer 2) a way to display the timer on screen 3) a way to stop the timer by completing an objective. If you could help me that would be greatly appreiciated.

Thanks a lot.
Payam
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 9th Aug 2010 15:50
About the countdown timer there can be lots of frames for each seconds----->each second = a frame. .for example 30 seconds has 31 frames from 30 to 0 and each frame shown for 1 sec.

For stopping it you can do something like this.

The object is "destroy the detonator".

The detonator is not spawn until you step in a trigger.

There are two other scripts set as main script for the detonator and other entity1(entity1 is outside the map and player can't see it).

The script of the detonator is :

If detonator spawn = 1 , entity1 spawn = 1

The scrip of the entity1 is the countdown script like this:


entity1 spawn = 1 , countdown start = 1
entity1 spawn = 0 , countdown stop = 1
countdown end = 1 , barrel1 addhealth = -20
.

(there should be a barrel to explode with the healths of 20)

After all when you destroy the detonator by shooting it's not spawn anymore and entity1 will spawn off and then because it's not spawn the timer will remove and the barrel wont say boooooooom.


I can't do all of these but I know how to do it.

(Sorry for bad English)

Have our guns was a mistake!!!

I am PaYaM
newguy035
14
Years of Service
User Offline
Joined: 27th Nov 2009
Location:
Posted: 10th Aug 2010 22:16
Thank you for your help. However, I am still a little confused about how the timer script works. Could you explain it?

Login to post a reply

Server time is: 2024-11-24 21:46:18
Your offset time is: 2024-11-24 21:46:18