OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: fragsta on 24 May 2003, 15:18:59
-
here is the thread. Anyone who can help, please post here or there: http://www.ofpec.com/yabbse/index.php?board=22;action=display;threadid=9668;start=0;boardseen=1 (look at bottom)
-
Can anyone tell me how to make it so that when I am inside a trigger area, an action will allow me to build an M1A1, and then it will pop up at a marker?
Use a repeating trigger:
type anyone
condition:player in thislist (only player will activate trigger this way)
on activation: build=player addaction ["Build Tank","buildtank.sqs"]
on deactivation: player removeaction build
Of course, "buildtank.sqs" would be whatever script you choose.
The build action will be removed when you leave the trigger area, or you could remove in the script.
To build the tank, your script would have something like this in it (in case you don't know already):
tank="m1a1" createvehicle getmarkerpos "markername"
-
Kewl thanks! I thought I would need to use loads of variables and stuff!
-
Ok everything works fine, i did the trigger the way you said and then i put a marker called warfactory, and made the script like this and saved it:
tank="m1a1" createvehicle getmarkerpos "warfactory"
but nothing happens when i select the action, not even an error message. No tank appears. Wat have i missed out?
thanks in advance
-
It's actually M1Abrams, not m1a1. Sorry about that.
-
It works perfectly, thanks!