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 / New Alarm Script - trigger zone on, manual off

Author
Message
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 23rd Feb 2012 17:17 Edited at: 23rd Feb 2012 18:46
Yep, that's right, you read that correctly, I actually managed to figure a script out for myself, without having to ask for help!!

The script I was writing was an alarm script, whereby the player triggers an alarm in a zone, then switches it off at the alarm box.

There were 2 things I had to figure out;

How to set off the alarm in a trigger zone, then how to enable the player to switch it off by 'using' an entity.

I needed to write/use 3 scripts to achieve this;

For the trigger zone I simply used a plrinzoneactivateifused script as usual.

Next I entered the name of the entity to be used by the player in the trigger zone's 'if used' field.

For the Alarm entity I wrote this script;



Next I entered the name of the dynamic light to be activated in the entity's 'if used' field.

The script I used for the dynamic light was this one;



It took me a good part of a day to figure all this out! It would have been easier if I was just wanting a straight forward alarm activated by the player 'using' an entity. But I wanted the alarm to be set off by a trigger zone, then switched off manually by the player.

(please note, I didn't write the 3rd script, it's one I found on the forums ages ago, but never had a use for until now. Sorry, I can't remember who wrote it. If you recognise it, please let me know, and you'll be added to my game's credits).

Pvt_Classified
12
Years of Service
User Offline
Joined: 19th Jan 2012
Location: How should I know?
Posted: 28th Feb 2012 12:24
Nice work. This will likely come in handy. Reminds me of the original Medal of Honor games, where the nazis set off the alarm if they see you and you have to shoot it or turn it off to stop more soldiers from coming. Ah, memories.

Keep up the good work.

Pvt_Classified

Pvt_Classified at http://assembledpirateswithblowtorches.weebly.com/
bruce3371
14
Years of Service
User Offline
Joined: 4th Aug 2010
Location: Englishland
Posted: 28th Feb 2012 17:12
Quote: "Nice work. This will likely come in handy. Reminds me of the original Medal of Honor games, where the nazis set off the alarm if they see you and you have to shoot it or turn it off to stop more soldiers from coming. Ah, memories."


Yes, it was MoH and Return to Castle Wolfenstein that inspired me to do this.

Quote: "Keep up the good work."


Thanks, I'll most certainly try to! In fact I've recently completed a new ladder, which can be found here;

http://forum.thegamecreators.com/?m=forum_view&t=194663&b=24

Login to post a reply

Server time is: 2024-11-24 02:38:28
Your offset time is: 2024-11-24 02:38:28