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 entities??

Author
Message
virtual studios
16
Years of Service
User Offline
Joined: 4th Dec 2008
Location: somewhere(I don\'t know/care)
Posted: 4th Dec 2008 19:35
hey there guys,
I have a problem..
I have made my own script(first time!!), and am having some troubles.
Here it is....





Well, basically, I applied this to a trigger zone, and then called the if-used bit Triggerbarrels, and then put in some barrels, and then called that Triggerbarrels. Then I clicked Spawn at start?No.
and spawn after delay?Yes.
What am I doing wrong??

The purpose of this script, is to make barrels appear when you walk through this trigger zone.
Please help me. Thanks.
Virtual Studios

The future is closer than you think
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 4th Dec 2008 20:15 Edited at: 4th Dec 2008 20:17
i am not that good in scripting, maybe you can just do it without scripting, but if you insist, you can loop, put at the end:

state=0

I think, dont know for sure.


PS: Phlystire is the best on scripting, the one and only


bye


Red Eye Productions © Copyright 2008
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 4th Dec 2008 20:16


That is incorrect. If you put "Triggerbarrels" into the IfUsed field of the zone's properties, then you should be able to use "activateifused". Now... you also have to activate it with a value. Normally activating with a "1" is the way to go for spawning entities, so a simple "activateifused=1" is what you'll want.


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.
virtual studios
16
Years of Service
User Offline
Joined: 4th Dec 2008
Location: somewhere(I don\'t know/care)
Posted: 4th Dec 2008 21:02
Hey there. Thanks for locating my problem!!
I would really appreciate it if you could post a revised version, with all the errors corrected.
I am not very good or experienced with scripting, so please do point me in the right direction if you can!!

Virtual Studios

The future is closer than you think
Marc Steene
FPSC Master
19
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 6th Dec 2008 09:20
;Artificial Intelligence Script

;Header

desc = plrinzonestartimer

;Triggers

:plrwithinzone=1:timerstart,state=2
:state=2,timergreater=25000:activateifused=1

;End of Script

Change the IfUsed box in the trigger zone to your barrel names. All those states weren't really necessary, but here's the script "translated" into English:

If the player is within the trigger zone, then start the timer and go to state 2.

If the state=2,and the timer is greater than 25 seconds, activate the entity described in the IfUsed box.

Hope it works

Free Segment Packs: V1-http://forum.thegamecreators.com/?m=forum_view&t=124552&b=24
V2 - http://forum.thegamecreators.com/?m=forum_view&t=124709&b=24
Marc Steene
FPSC Master
19
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 6th Dec 2008 09:21
You could optimise it further by using this script:

:plrwithinzone=1:timerstart
:timergreater=25000:activateifused=1

Free Segment Packs: V1-http://forum.thegamecreators.com/?m=forum_view&t=124552&b=24
V2 - http://forum.thegamecreators.com/?m=forum_view&t=124709&b=24
Plystire
22
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 7th Dec 2008 05:44
That second one won't work, marc. As long as the player is in the zone, it'll continuously restart the timer and it'll never activate.


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.
virtual studios
16
Years of Service
User Offline
Joined: 4th Dec 2008
Location: somewhere(I don\'t know/care)
Posted: 7th Dec 2008 16:28
Thanks guys, that is seriously helpful.


The future is closer than you think

Login to post a reply

Server time is: 2025-05-23 06:07:27
Your offset time is: 2025-05-23 06:07:27