PDA

View Full Version : Temporarily disabling units, and enabling them



Gravengrav
Apr 12 2011, 18:36
Hi!

I tried to find out how I could temporarily disable a unit at mission start, and by entering a trigger, enabling them again (making them pop out of nowhere so to speak).

I seem to recall beeing able to do this before, but I seem to have forgotten. I found the hide command, but although hidden, the unit seems to be able to move around and attack.

Anyone know the command I am looking for?

Igneous01
Apr 12 2011, 20:26
enablesimulation false - this will stop all simulations on a particular object or unit.

disableai "MOVE"/"TARGET"/"AUTOTARGET" - disables a component of the ai's ability.

Demonized
Apr 13 2011, 00:03
also there is "ANIM" that can be used with disableAI, but 1st suggestion is the ultimate OFF switch.

and use setCaptive (http://community.bistudio.com/wiki/setCaptive) while hidden will make units never be engaged when hidden.

but since you already are going into scripting, check out BIS_fnc_spawngroup (http://community.bistudio.com/wiki/BIS_fnc_spawnGroup)

Gravengrav
Apr 13 2011, 13:33
but 1st suggestion is the ultimate OFF switch.


This sounds familiar. And the whole command would be something like "this off"? And to reenable it: "this on"?

Sorry, it's been some years since last I tried editing, and it seems like I have lost most of what I learned a while back.

Demonized
Apr 13 2011, 14:44
http://community.bistudio.com/wiki/enableSimulation

Günter Severloh
Apr 13 2011, 21:21
Here is a script that does what your asking:
Bis forums thread
http://forums.bistudio.com/showthread.php?t=91232&highlight=RMM+Reducer
Armaholic:
http://www.armaholic.com/page.php?id=8544