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 / trigger question

Author
Message
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 26th Nov 2008 01:37
ok, well i wanted to know is it possible to have a sound zone and a door in front of it and you can't open the door until the sound is over?

ww2theaftermathgame.webs.com
work in progress demo coming soon.
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 26th Nov 2008 04:53
This might be possible, if you use "timerstart" and "timergreater=x" commands.


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 26th Nov 2008 19:51
ok thanks for the tip ill check it out.

ww2theaftermathgame.webs.com
work in progress demo coming soon.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 27th Nov 2008 00:53
not really getting how timestart and timegreater=x works.

ww2theaftermathgame.webs.com
work in progress demo coming soon.
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 28th Nov 2008 02:52
timerstart: starts the one and only timer inside FPSC
timergreater: checks to see if the timer (see above) is greater than a specific value, in milliseconds.

Example script (this does nothing other than check the timer):

:state 0:timerstart, state=1
:state=1,timergreater=10000:state=0

In the example, the timer is started in state 0 and then the script moves to state 1. In state 1, the script checks to see if the timer is greater than 10 seconds (10000 milliseconds). If it is, it moves back to state 0.

The important thing to note is that you cannot have more than 1 timer called at any given moment - and that is throughout ALL scripts. FPSC only has 1 timer. If you start a timer in one script, and then start another one (either in the same script or in another script), then the timer is reset in all instances.

Does this help?
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Nov 2008 04:01 Edited at: 28th Nov 2008 04:12
ok i get it i can use plrfreeze and use timergreater just to freeze the player for nine seconds i tried this it didnt work ill try some rearranging



ww2theaftermathgame.webs.com
work in progress demo coming soon.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 1st Dec 2008 02:06
Quote: "it didnt work"


Elaborate


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 1st Dec 2008 23:46
Here is my thought, write a new script for the audiozone, the timer length being the length of the audio clip. At the end, have it activate the door, and script the door so when activated, it is possible for the player to open it

My thoughts:



^for the door main, is modified locked door script^




^audio zone - set door name as ifused property^


Generally I dont give out scripts but I need practice. I haven't tested, but it should work.


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Dec 2008 21:54
your script didn't play the sound after the time was up my huds started going crazy it kept playing the attack hud my health and ammo huds kept fading away and coming back.

]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Dec 2008 22:39
It sounds like you're trying to do much more than what you've shown us.


Try making a small level that ONLY uses your script. Make sure that your script (or set of scripts) are the ONLY things running in the level.


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 2nd Dec 2008 22:51
Oh, you want it to keep playing the sound after the time is up? my apologies

:state=0,plrwithinzone=1:sound=$0,timerstart,state=1
:state=1,timergreater=(time here):activateifused=1
:state=1,plrwithinzone=1:sound=$0


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 2nd Dec 2008 22:53 Edited at: 2nd Dec 2008 22:54
ok ply i tried what you said and with meteorites script it did the same as before and with mine it played the noise but didnt freeze the player.

Edit: no meteorite the problem was the sound didn't even play

]
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 2nd Dec 2008 23:26
Quote: "The important thing to note is that you cannot have more than 1 timer called at any given moment - and that is throughout ALL scripts. FPSC only has 1 timer. If you start a timer in one script, and then start another one (either in the same script or in another script), then the timer is reset in all instances."

There is a work around for that now that we have variables.
You can script multiple timers.

Quote: "Edit: no meteorite the problem was the sound didn't even play"

Try using a full path in the script...

sound=audiobank\user\yoursound.wav

instead of sound=$0

ALSO:
You could simply use a remote door and open it by activating it.
That is easy to do with a timer.

Don't forget to visit Conjured Entertainment

Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Dec 2008 00:51
i rather it freeze the player until the times up.

]
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 3rd Dec 2008 00:57
Try the command plrfreeze, should be something like that?


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Dec 2008 01:00
well i tried this before you tried to help me but it didn't work.



]
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 3rd Dec 2008 03:04
did it freeze the player? did it play the sound? what didnt work?


Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Dec 2008 04:15
it will play the sound but not freeze the player and it only played the sound when i used plys suggestion to make a small level and only use 1 script.

]
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 3rd Dec 2008 09:33
I thought someone said that the value given to the "plrfreeze" command was basically telling FPSC how LONG the player should be frozen for in milliseconds... so "plrfreeze=1" would freeze the player for 1 millisecond.

With that in mind, I would get rid of the timer and just use "plrfreeze=9000".


Worth a shot, right?


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 3rd Dec 2008 22:27
plys your he best

]
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 3rd Dec 2008 22:49
I wondered why I could never get it to work right, I had to continuously call the command, but plrfreeze is worthless to me now


Login to post a reply

Server time is: 2024-11-24 16:30:30
Your offset time is: 2024-11-24 16:30:30