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 / Searching for Script: Destroy Camera, deletes zone.

Author
Message
KeithC
Senior Moderator
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 7th Apr 2011 15:43
Hey guys. Not being any good at scripting, and in a bit of a time crunch, I thought I'd ask for help here.

I'm trying to alter/look for a script that I can apply to either a trigger or win zone; whereas once you step into it, alarms will sound and you will lose the game (fade out, as in a win zone). But if you shoot/destroy a camera, the zone will disappear, and you can proceed on your way. Here's an example image I have:



If I try to pass by the camera on the left (without destroying it), I want to have zones I set up on the sidewalk in front of it that will do as I described above. If I shoot it, I want the zone to disappear.

Any help would be much appreciated.

-Keith

xplosys
20
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 7th Apr 2011 15:53 Edited at: 7th Apr 2011 16:07
It may be easier to use PLRDISTWITHIN. If the player gets within so many units of the camera the alarm sounds. If he shoots the camera before getting within so many units, it will be destroyed and not trip the alarms. Of course it depends if the camera is approachable from another direction, like if the player can enter the building in the picture and get close enough to the camera to trip the script.

Something like this...

:state=0,shotdamage=1:destroy
:state=0,plrdistwithin=200:state=1
:state=1:sound=YourSound,gameover

Brian.

... and the band played on.
Visit ExploSoft.com
KeithC
Senior Moderator
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 7th Apr 2011 15:58 Edited at: 7th Apr 2011 15:59
The 2 or 3 cameras I have set up can only be approached from one direction and it's very controlled (like the alleyway shown). Basically; if you get in front of the camera without destroying it, the game fades to a "lose screen" (which is why I was thinking of a win zone, just with a lose screen that pops up instead); then you start over.

The building on the left cannot be entered, so I was going to set up a zone to fill one segment wide in front of it (possibly 2).

-Keith

xplosys
20
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 7th Apr 2011 16:04
Sorry,

Updated my post while you were posting.

... and the band played on.
Visit ExploSoft.com
KeithC
Senior Moderator
20
Years of Service
User Offline
Joined: 27th Oct 2005
Location: Michigan
Posted: 7th Apr 2011 16:46
Sent you an email, Brian.

-Keith

bobochobo
18
Years of Service
User Offline
Joined: 9th Jul 2008
Location: My house, in the middle of my street
Posted: 8th Apr 2011 13:58 Edited at: 8th Apr 2011 13:59
Not sure if you still need it but:

For the camera, with the triggerzone's name in the ifused field;


For the triggerzone;



Forgot to add in sounds, but that should be easy enough.

Login to post a reply

Server time is: 2026-07-18 09:01:33
Your offset time is: 2026-07-18 09:01:33