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 / Level Completion Time

Author
Message
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Oct 2010 15:07
Hi,

For my game idea I would like to record the time it takes the player to complete each level, so that the game can reward the player if a certain time limit is not exceeded, etc.

Has anyone tried this before? If so would you be willing to let me know how this was done? I don't need the details of your implementation, just some guidance on what the conditions/actions you used were. I'm keen to do the scripts myself.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Gencheff
14
Years of Service
User Offline
Joined: 12th Jun 2010
Location: UK by way of USSR
Posted: 6th Oct 2010 21:15 Edited at: 6th Oct 2010 21:18
Use a timer.

:state=0:timerstart,state=1

Then to check if the time is greater than say 3 minutes.However the timer is in milliseconds,so you'll have to figure out how much will that be in milliseconds.

:state=1,plrdistwithin=200:reward player with something
:state=1,timergreater=x:state=2
:state=2,plrdistwithin=200:do something to indicate that the player failed


Basically you put this over the winzone in a trigger zone or dynamic light.It checks if the player is in a radius of 2 segments (easily adjustable 1x100 = segment) .This is some trickery , but it should work.

If the timer is greater than x which should be a time in milliseconds,it changes a state to 2 and the player gets told he failed(improvise).

Anything under that time will be considered a pass.The trick is for the player to be within 2 segments radius to trigger it.

Mr illusionest
15
Years of Service
User Offline
Joined: 5th Mar 2009
Location: Cairo , Egypt
Posted: 7th Oct 2010 20:16
I see you are doing a great job helping the community , Gencheff , Keep it up man .
P.S : What is that gencheff media signature thing ?

Cheers

"I am the night visitor when everyone is sleep , and when the last light fades"
The illusionest
anayar
15
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 7th Oct 2010 20:19
Quote: "P.S : What is that gencheff media signature thing ?"


Its his new sig, and it looks pretty damn cool! Like the avatar too Gencheff, keep it up

Cheers,
Anayar


For KeithC

Login to post a reply

Server time is: 2024-11-24 19:57:27
Your offset time is: 2024-11-24 19:57:27