Jump to content

Ersk

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Ersk

  • Rank
    Rookie
  1. I have just started to learn the arma scripting language. I have managed to spawn 2 units together using the code below but I would like to spawn only 1 unit. Can someone tell me how to do that? SoldierWPilot" createUnit [getMarkerPos "pilotSpawn", _newGrp,"", 0.5, "private"]; Thanks in advance. EDIT I had named my script init.sqf and have only just fount out that if you name the file "init" then the script will initialise at the start of the mission. Before I knew this I was also using "nil = []exec "init.sqf" which meant my script was being called twice, hence why it was spawning 2 units :P
  2. The extension i am usng is .sqf. I also tried "if( (fuel OFpilot1) < 8)then" if thats what you meant but that didn't help.
  3. Basicly, I have made a script that moves an AI unit (OFpilot1) to an Su-34 (OFplane1), mounts and takes off. The script then checks the to see if fuel is under 90% and if so, orders the unit to land at pita airstrip. I have tried lots of things but the main error I am getting is on the lines of "type boolean, expected number, string, int... etc" but all my data types appear to be correct. [color="Gray"]//ai unit moves to and gets in plane[/color] OFpilot1 doMove position OFplane1; OFpilot1 assignAsDriver OFplane1; [OFpilot1] orderGetIn true; _landed = false; while{_landed == false}do { if(fuel OFpilot1 < 8)then { OFpilot1 landAt 2; [color="gray"]//checks to see if unit has landed[/color] _playerStatus = unitReady OFpilot1; if(_playerStatus == true)then { [color="gray"]//exit loop[/color] _landed = true; } } } note. The first 3 lines of code work fine, the unit moves to the plane and takes off. Thanks in advance.
×