1. Is it possible to make an autoturret be fired in a straight line, instead of simply dropped in front of you?
2. I'm trying to execute LUA codes when autoturrets are dropped, but my if/else statements don't work.
Code: Select all
OnCharacterDispenseControllable(
function(player, controllable)
if GetEntityClassName(controllable) == ame_weap_inf_formup_ord then
ClearAIGoals(GIS)
KillObject(controllable)
AddAIGoal(GIS, "Follow", 100, 0)
elseif GetEntityClassName(controllable) == ame_weap_inf_defend_ord then
ClearAIGoals(GIS)
AddAIGoal(GIS, "Defend", 100, controllable)
end
end
)Any help is appreciated.



