1) I am calling the specific animation, not the animation group, right?
2) Can the animation still be triggered if the region in question already has specific properties? (It's a damageregion)
3) Assuming my animation is called tankdoor and my region is named tank1, what's wrong with this coding? I ask because with this setup, I don't get the animation to trigger.
Code: Select all
--------------------------------------------------------
-------------------
-- ScriptPostLoad
--------------------------------------------------------
-------------------
function ScriptPostLoad()
DisableAIAutoBalance()
SetUberMode(1);
SetAIDifficulty(10, -5)
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT
= "game.modes.tdm",
textDEF
= "game.modes.tdm2", multiplayerRules = true,
isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
ActivateRegion("tank1")
region1 = OnEnterRegion(
function(region, player)
if IsCharacterHuman(player) then
PauseAnimation("tankdoor")
RewindAnimation("tankdoor")
PlayAnimation("tankdoor")
end
end,
"tank1"
)
end


