Home   Help Search Login Register  

Author Topic: Changing an Object mid mission  (Read 826 times)

0 Members and 2 Guests are viewing this topic.

PunkerSXDX

  • Guest
Changing an Object mid mission
« 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_Milky_Bar_Kid

  • Guest
Re:Changing an Object mid mission
« Reply #1 on: 29 Oct 2002, 22:57:23 »
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.

PunkerSXDX

  • Guest
Re:Changing an Object mid mission
« Reply #2 on: 30 Oct 2002, 00:55:28 »
Okay, I'll give it a Shot, Thanx Man