trying to adapt the apoc script to cable tie all the civies but not having much luck, any ideas?
Code:
tieciv = tieciv or function()
for u_key,u_data in pairs(managers.enemy:all_civilians()) do
tieunit(u_data)
end
for u_key,u_data in pairs(managers.enemy:all_enemies()) do
u_data.char_tweak.has_alarm_pager = nil
tieunit(u_data)
end
end
function tieunit(pawn)
local col_ray = { }
col_ray.ray = Vector3(1, 0, 0)
col_ray.position = pawn.unit:position()
local action_data = {}
action_data.attacker_unit = managers.player:player_unit()
action_data.col_ray = col_ray
pawn.managers.groupai:state():on_hostage_state(action_data)
end
Aucun commentaire:
Enregistrer un commentaire