Place units on buildings dont works...

  1. 8 years ago

    I need help! I made a simple Alive Mission but if i want to place custom units like a rifle-man on top of a guard tower he spawns at the ground ... same whit buildings :/ I am using eden editor

  2. Edited 8 years ago by DaVidoSS

    For militarize buildings we use Military Close Quarters Battle (ALiVE_mil_cqb) module.

  3. yes but for example i want to make a custom start base and the start base got 4 Military guard Towers i want to place a mg and one soldier on them but it doesent work ...

  4. Edited 8 years ago by DaVidoSS

    If you want to do this manually you need to make this like that:

    Place unit very close to the guard tower.
    Add this code in unit init field:

    	if (isServer) then {
    	
    		[this] spawn {
    		
    			params ["_guardier", "_buildings"];
    			_buildings = nearestObjects [getpos _guardier, ["house"], 10];
    			_guardier setPosATL ((_buildings select 0) buildingPos 1);
    			_guardier addPrimaryWeaponItem "acc_flashlight";
    			_guardier enableGunLights "forceON";
    		};
    	};

    For adjusting the unit position, change the "buildingPos 1" to "buildingPos _x" where _x is a index number (from 0 to (count buildingpos) -1) of in buildings positions.

    In this way you can set the unit on exact needed position.

    Make the same for every unit

  5. Edited 8 years ago by EaTMyDmG

    Yeah i tried that but the when i preview the Mission the units are on the ground of the building ... when i remove all modules it works!? IDK what i should do...

  6. Are you trying to do this with your Player and Playable units or just ones you manually place (that aren't Player or Playable)?

  7. Edited 8 years ago by SpyderBlack723

    Make sure the units are not virtualized. If they are synced to the Virtual AI module then unsync them. If they are not synced to the Virtual AI module, then sync them to it.

  8. That's what I was getting at.

    I use the 'only virtualize synced units' option in the Virtual AI module so I was thinking if he placed these as non-playable, then unsyncing them should fix it assuming he uses the same setting.

  9. Deleted 8 years ago by PillowTalk
  10. I loe you guys! (nohomo) rly thanks alot helped

 

or Sign Up to reply!