OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: PunkerSXDX on 29 Oct 2002, 05:06:31
-
I what to know how I could Change an Object to another in the Middle of a Mission with out a Script (if it's Possible). For example, Changing a Invisible Helipad to an Ammo Crate to simmulate an Ammo Drop, if it's not pssible then how can I put an Object in a cirtain Spot, on a Trigger or Way Point.
-
The best way I can think of to do this would need a script. There are two ways:
-Give the object a name e.g."Obj1"
-Create a Game Logic called "Obj1pos"
-Add the other object (but out of the missions way) call it "Obj2".
-Then make a trigger witht he following command line
[Obj1,Obj2,Obj1pos] exec "Change.sqs"
to activate the following script:
_obj1 = _this select 0
_obj2 = _this select 1
_Obj1to = _this select 2
_obj1 setpos [getpos _Obj1to select 0, getpos _Obj1to select 1]
_obj2 setpos [getpos _Obj1 select 0, getpos _Obj1 select 1]
exit
N.B: That script must be called "Change.sqs" and put into your mission folder.
Hope that helps.
-
Okay, I'll give it a Shot, Thanx Man