number3 Posted December 21, 2013 Posted December 21, 2013 I've been playing around with activating and deactivating units. After activating a unit I assign it a task and then deactivate it after 5 minutes. But usually by the 1st or 2nd deactivate occurs I get an error message and DCS crashes 00095.320 ALERT WORLDGENERAL: AI::Controller exception: No state creator for task "AttackGroup" and controller "wcColumn" Here is is basically what I have and where I've been able to isolate where the problem might be. However I'm not sure what the problem is exactly. Anyone come across this error before and know what might be the cause? :helpsmilie: function activate_untis(...) ... local defender_group = Group.getByName(defender_group_table[zone_index]) trigger.action.activateGroup(defender_group) local attacker_group = Group.getByName(attack_group_table[zone_index]) trigger.action.activateGroup(attacker_group) -- Set infantry to be immortal local controller = attacker_group:getController() set_immortal = { id = 'SetImmortal', params = { value = true } } Controller.setCommand(controller, set_immortal) -- Set target of attacking group if (nil ~= defender_group or nil ~= defender_group.id) then attack_group_task = { id = 'AttackGroup', params = { groupId = defender_group.id } } Controller.pushTask(controller, attack_group_task) end ..... scheduleaaaspotting = mist.scheduleFunction(deactivate_group, {attacker_group}, timer.getTime() + 300, 300) end function deactivate_group(group_obj) mist.removeFunction(scheduleaaaspotting ); if (nil ~= group_obj) then local controller = group_obj:getController() Controller.resetTask(controller) trigger.action.deactivateGroup(group_obj) end end 314-я смешанная авиационная дивизия 314th Mixed Aviation Division: The "Fighting Lemmings"- Forums: http://314thsquadron.enjin.com/ - ED Forum Group: http://forums.eagle.ru/group.php?groupid=119
Recommended Posts