OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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.
-
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.
-
;;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
-
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?
-
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
-
I think I read somewhere that you can use createvehicle instead of camcreate, and that was supposed to work in MP...
cheers...
-
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)
-
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