OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: XXXVader on 23 May 2003, 02:23:29

Title: Trip Wire Script
Post by: XXXVader on 23 May 2003, 02:23:29
Im working on a Traps menu for my mod that gives the player several new traps to use all through scripts.  I managed to get proximity and ap mines to work beautifully however im having trouble with the Trip Wire.

When a player crosses the trip wire a flare is suppose to shoot up without using the camcreate.  However when i use createvehicle to spawn the flare the model of the canister spawns and not the lights and effect.  Please help.
Title: Re:Trip Wire Script
Post by: macguba on 23 May 2003, 08:50:42
Why don't you want to use camcreate - it would work fine.     You could maybe use setVelocity to it to make it go up into the air.
Title: Re:Trip Wire Script
Post by: Terox on 23 May 2003, 14:58:50
;;Autoflare system for nightime illumination
;;requires a gamelogic as a marker
#START
?(Time>=Param1):exit
flare1="flaregreen" camcreate [getpos flarelogic1 select 0,getpos flarelogic1 select 1,1]
;;You can change these numbers. [0,0,0] will keep flare at spawn point until it goes out. Negative numbers reverse the direction
#LOOP
flare1 setvelocity [2,14,18]
?(flare1 distance flarelogic1) >100:goto "SLOWDOWN"
~0.1
goto "LOOP"
;;After getting X meters away from logic, flare goes to this number for slowing effect.
#SLOWDOWN
flare1 setvelocity [3,14,18]
;; Flare only burns for 15 seconds or so, so dont take it to high or far.
#end
exit
*************************************************************************




create a gamelogic named flarelogic1 where you want the flare to fire
Title: Re:Trip Wire Script
Post by: XXXVader on 23 May 2003, 16:53:07
Thanks for the script, but the problem is last time i used camcreate in multiplayer it didnt show on all the computers just on the person whos executing it.
Has this been fixed?
Title: Re:Trip Wire Script
Post by: XXXVader on 23 May 2003, 17:10:10
Wahooo thanks dude i got it figured out.  I used the flaregreen from your script and then mine work perfectly, i used the red one and it didnt light up:D
Title: Re:Trip Wire Script
Post by: Mujahedeen on 23 May 2003, 17:27:08
I think I read somewhere that you can use createvehicle instead of camcreate, and that was supposed to work in MP...

cheers...
Title: Re:Trip Wire Script
Post by: _Ross_ on 17 Jun 2003, 08:56:25
Just make a 20 X 1 rectangular trigger to represent the wire then when activated by the player, a game logic blows up under him
(just a thought)
Title: Re:Trip Wire Script
Post by: Shaggy on 18 Jun 2003, 07:20:29
How can I actaully make/download this tripwire addon  ???

I need it for my ADDON aswell and it will come in handy for both flares and claymores ;)

Thanks