Home   Help Search Login Register  

Author Topic: create unit  (Read 627 times)

0 Members and 1 Guest are viewing this topic.

gadolinite

  • Guest
create unit
« on: 29 May 2003, 04:22:22 »
how would you spawn (make it appear out of thin air under a certain condition) a cobra with it's special 'flying' and give it a name 'AH1' using the createunit command at a marker named 'here'.  If this is not the command then how do you do it?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:create unit
« Reply #1 on: 29 May 2003, 10:20:27 »
I'm not sure, but if you want it already flying it might be easier to setpos it in rather than createUnit it.    

To do that, create a flying chopper at an obscure corner of the map and name it as you like.     Create your marker.    At the appropriate moment:-

AH1 setPos getMarkerPos "here"

You might need to experiment with giving it waypoints (before/after the setpos) to get it going the right way, or possibly use setVelocity.

It's easy to give a unit a name when you are using createUnit.   In the bit for the unit's init field write

this = AH1

I think that's right, anyway.   You can certainly do it in the init field.   Dunno about the special field though.
Plenty of reviewed ArmA missions for you to play