Home   Help Search Login Register  

Author Topic: Need help with createUnit command  (Read 557 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Need help with createUnit command
« on: 02 Oct 2005, 19:48:02 »
How do I create a civilian plane to certain marker position and make it to fly at certain height at start?

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:Need help with createUnit command
« Reply #1 on: 02 Oct 2005, 22:40:13 »
Code: [Select]
_myHeight = _this select 0
_plane = "Plane" createVehicle getMarkerPos "Mkr_Plane"
_plane setPos [getPos _plane select 0,getPos _plane select 1,(getPos _plane select 2) + _myHeight]

_man = "Man" createUnit [getMarkerPos "Mkr_Plane",groupMan,"man1=this; this moveInDriver _plane",0.5"PRIVATE"]
_man doMove getPos myLogic

That should work. Make that as a script and execute the script as such:
Code: [Select]
[HeightPlaneIsToFlyIn] exec "scriptname.sqs"
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Serial Killer

  • Guest
Re:Need help with createUnit command
« Reply #2 on: 03 Oct 2005, 13:56:51 »
Thanks!!