CarlGustaffa 4 Posted October 17, 2007 Hi Being relatively new to this, I have just become "aware" of one of the greater bugs in the engine/editor -- the fact that units which has been disabled using disableAI "MOVE", will be reset during saving. I use MOVE, TARGET, and AUTOTARGET disabling A LOT! Basically this means that my mission (2-4 hours of playtime using my playstyle) doesn't really work out as planned; Once I'm "on location" the units are no longer in the position and arrangement I gave them. So, how do you cope with this? And, is this another "feature by design" by BIS, or will this eventually be fixed? I'm just about ready to give up all together Share this post Link to post Share on other sites
sickboy 13 Posted October 17, 2007 How do you activate the disableAI commands? I am very unfamiliar with Single Player and thus Saving/Loading, but I would guess that scripts ran from the init.sqs/sqf or commands executed from the init lines of soldiers are ran again when you load? If this is the case then simply executing in either of above mentioned options will disable the AI again upon load. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted October 17, 2007 I have this some unnamed units initfield: this setUnitPos "MIDDLE"; this disableAI "MOVE" When I want to cancel it, I use enableAI "MOVE" (and setUnitPos "AUTO" respectively). When I click the savegame, it instantly starts to move. If I load that savegame, it also instantly starts to move. setUnitPos does not seem to be cancelled. Just checked, and bugtracker lists it as a bug: http://bugs.armed-assault.net/view.php?id=2419 Re-executing init lines doesn't sound like a good idea, think about all those addmagazine commands Maybe I misunderstood you though. I did try a singleplayer mission with sort of a fix for this, but it only gave limited saves and ruins one of the key features I like in ArmA over OFP -- unlimited saves for us that can't shoot straight but still would like to enjoy the game. Share this post Link to post Share on other sites
Maddmatt 1 Posted October 17, 2007 Init commands are not run again after a save or load. Only at mission start. The global variable time is reset to 0 after loading a game. So you could have a script check it every so often and execute commands when a game is loaded. Info on time. Share this post Link to post Share on other sites
ColonelSandersLite 0 Posted October 17, 2007 rough code: unit's initfield: this execVM "disableAIMove.sqf" disableAIMove.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = this; while {true} do { waitUntil {Time < 2}; _unit disableAI "Move"; sleep 1; }; Share this post Link to post Share on other sites
CarlGustaffa 4 Posted October 17, 2007 Hmm, would this affect any laggyness? Also, how do I cope with units that have started moving, wouldn't they just stop when they shouldn't? Seems like a whole lot of global variables at work, considering the number of units this affects. Have to rest a couple of days on this one... But thanks, nice suggestions. Would unit stop true and false work better at least until the player is in the general area? At least I could work out "auto saves" that could work this way, but it won't prevent the "user saves" from going bad. Frequent autosaves are annoying, and too rare autosaves with buggy usersaves, are extremely frustrating. How to determine the balance? Oh well..... Need sleep... Share this post Link to post Share on other sites