Jump to content
  • 0

Spawning NPC's on modular buildings


Droge Worst

Question

Hey guys,

 

I've got a quick question for you. I want NPC's (traders) to spawn on top of Modular buildings (metal floors). I added them inside a .sqf file in the mission folder. When I admin start the script the NPC's are on the right spot inside the building 13 above groundlevel., but on restart with that same script they are outside the modular buildings. Do you guys know how I can set it up that first the Modular buildings will spawn and after that the NCP's? 

 

This is the script: 

_unit_1 = objNull; 
if (true) then
{
  _bldObj = createAgent ["GUE_Soldier_2", [4494.95, 6003.62, 13], [], 0, "CAN_COLLIDE"];
  _unit_173 = _bldObj;
  _bldObj setDir 300;
  _bldObj setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;";
  _bldObj setUnitAbility 0.60000002;
  _bldObj allowDammage false; _bldObj disableAI 'FSM'; _bldObj disableAI 'MOVE'; _bldObj disableAI 'AUTOTARGET'; _bldObj disableAI 'TARGET'; _bldObj setBehaviour 'CARELESS'; _bldObj forceSpeed 0;_bldObj enableSimulation false;
};


_unit_2 = objNull;
if (true) then
{
  _bldObj = createAgent ["USMC_Soldier2", [4491, 6003.29, 12], [], 0, "CAN_COLLIDE"];
  _unit_225 = _bldObj;
  _bldObj setDir 20;
  _bldObj setVehicleInit "this allowDammage false; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'AUTOTARGET'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0;  ";
  _bldObj setUnitAbility 0.60000002;
  _bldObj allowDammage false; _bldObj disableAI 'FSM'; _bldObj disableAI 'MOVE'; _bldObj disableAI 'AUTOTARGET'; _bldObj disableAI 'TARGET'; _bldObj setBehaviour 'CARELESS'; _bldObj forceSpeed 0;_bldObj enableSimulation false;
};
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...