Results 1 to 2 of 2

Thread: ACE2 item spawning with createvehicle array problems

  1. #1

    ACE2 item spawning with createvehicle array problems

    hi. so i am trying to spawn things like ACEbackpacks, earplugs and MORPHINE

    but when i try and do so i get errors like

    Cannot create non-ai vehicle ACE_COMBAT_PACK,
    Cannot create non-ai vehicle ACE_EPINEPHRINE,
    Cannot create non-ai vehicle ACE_MORPHINE,

    anyone can help here?

    the code i am using to do this is ...

    Code:
    // for loop determing loot type
    
    _arrayO = ["ACE_Flashbang", "TK_ALICE_Pack_EP1", "ACE_Medkit"];
    		
    		
    		
    		_loottype = floor (random 3);//pistol or mg etc
    
    		
    		if (_loottype == 0) then {
    _arrayO = ["ACE_WIRECUTTER", "TK_ALICE_Pack_EP1", "ACE_BBETTY_M", "ACE_Knicklicht_R","ACE_GlassesGasMask_RU","ACE_Medkit","ItemGPS"];
    _tPos globalChat format ["Object cache 1"]; 
    		};
    		
    		if (_loottype == 1) then {
    _arrayO = ["ACE_BANDAGE", "ACE_COMBAT_PACK", "ACE_EARPLUGS","ItemRadio"];
    _tPos globalChat format ["Object cache 2"]; 
    		};
    		
    		if (_loottype == 2) then {
    _arrayO = ["ACE_MORPHINE", "ACE_Flashbang", "PMC_ied_v1", "ACE_Backpack_Wood"];
    _tPos globalChat format ["Object cache 3"]; 
    		};
    		
    		
    		_pos1 = _tPos;
    		
    		
    
    _randnum = floor (random (count _arrayO));
    _objectH = _arrayO select _randnum;
    
    
    	_acrate = createVehicle [_objectH,  getPos _pos1, [], 0, "NONE"];
    			_s1 = "USMC_Soldier_Pilot" createVehicle getpos _pos1;  // create fake unit
    			//
    			_s1 setpos getPos _pos1;  // set him at building pos 
    _s1 setvelocity [0,0,5]; // in case he spawns a little high let him fall (may not be needed)
    
    			sleep 2;
    			_acrate setpos (_s1 modeltoworld [0,0,0]);   //place weapons at his feet.
    			_acrate setDir floor (random (270));
    			deletevehicle _s1;  // remove soldier 
    
    
    	
    	
    	
    //Smoke1 = "Smokeshell" createVehicle getPos _tPos;
    };
    
    if (_chance >70 ) then {
    
    Smoke1 = "SmokeshellRed" createVehicle getPos _tPos;
    
    
    };
    
    
    	_c=_c+1;
    	//	sleep 1.1;
    };
    
    
    
    // called with 		_nil = [this] execVM "randammoinbuilding.sqf"
    might have solved this- problem is that many of the above objects are actually magazines or weapons. my lack of experience is showing again.

    may i take this chance to say that the 6 config browser is very thorough but tricky to browse.
    Last edited by twisted; Aug 12 2012 at 08:39. Reason: solved it.

  2. #2
    Moderator [FRL]Myke's Avatar
    Join Date
    May 27 2007
    Location
    Yay, Rank 34 of 47119 and catching up.
    Posts
    5,720
    Next time use the ACE thread for ACE related questions. But glad anyway you solved it.


    -Closed-

Similar Threads

  1. Problems with vehicle class action menus when item placed in a house
    By MadMonk in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 4
    Last Post: Aug 2 2012, 11:21
  2. Item ID (Admin trying to find a hacked item in the logs)
    By Xaio in forum ARMA 2 & OA - Servers & Administration
    Replies: 1
    Last Post: Jul 24 2012, 22:44
  3. objects created by createvehicle array oscillate?
    By Tankbuster in forum ARMA 2 & OA - TROUBLESHOOTING
    Replies: 0
    Last Post: Nov 27 2011, 21:49
  4. Players pick up item from dead team mate, become the item carrier
    By 2nd Ranger in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 1
    Last Post: Apr 21 2011, 22:51
  5. remove item from array
    By {Op4}Bsilenced in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Mar 13 2010, 23:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •