How do i change the team of a turret when cp is captured?
Posted: Fri Aug 26, 2011 5:02 pm
Hi, I want a certain CP to control the team number of a group of turrets. Say if team 1 starts with cp5 then the turrets would start as team 5 turrets but if team 2 takes the CP then the turrets would change to team 2. I have already attempted to accomplish such but my code (shown below) failed.
Does anybody have any suggestions that might help? thanks
Code: Select all
OnTeamChange(
function(object)
if GetEntityName(object) == "cp5" then
SetObjectTeam(tur_bldg_chaingun_roof,GetObjectTeam("cp5")
)
end
end
)