Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Need help with createUnit command  (Read 690 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!!