Editors Depot - Mission Editing and Scripting > Arma2 - Editing/Scripting General

Waypoing on activation/condition via script AND Heli commands

<< < (2/2)

h-:
OK, attached a small sample mission where a chopper flies back and forth between start position and randomly selected triggers. Unpack it in your Mydocs->ArmA 2-> missions and open it in the editor.

Mind you that his is done for Arma2:CO (both Arma2 and Arma2:OA installed) so if you're using just original Arma2 this mission won't work because it uses a terrain available in OA only.. It's for the Desert map.

Mad Pup:
Thanks for the help! That problem has been solved, and I'm progressing in the mission.  :)

However, I've run into another problem.
I'm using the createVehicle command. I'm creating a "HMMWV_M1035_DES_EP1" in a script. I would like this Hmmwv to be teleported, via script, using the "setpos getpos trig1" command? Since it has no name, I'm not quite sure how to do this.

Thanks in advance

~Mad Pup

h-:
It depends on how you create it in the script.

You can 'assign' a name to the car when creating it:
mycar = "HMMWV_M1035_DES_EP1" createVehicle pos;
Then when you want it teleported just do:
mycar setPos (getPos trig1);
That way the car can be referenced using global variable mycar, which is the same thing as giving it a name in the editor.

If you're creating multiple vehicles of the same type the naming stuff get's a bit more complicated.

Navigation

[0] Message Index

[*] Previous page

Go to full version