View Full Version : Temporarily disabling units, and enabling them
Apr 12 2011, 19:36
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?
Apr 12 2011, 21: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.
Apr 13 2011, 01: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)
Apr 13 2011, 14: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.
Apr 13 2011, 15:44
Apr 13 2011, 22:21
Here is a script that does what your asking:
Bis forums thread
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.