Page 1 of 1
AI Paths/ Barriers/Weights attached to objects?
Posted: Sat Apr 01, 2006 11:39 pm
by Ace_Azzameen_5
Just curious as to how the AI don't jump into the lava on mustafar after the bridges are out. Learnig how to do this would get rid of a somewhat minor AI difficulty in my wip map.
Posted: Sat Apr 01, 2006 11:46 pm
by xwingguy
Here ya go, straight from the Mustafar script in the assets:
Code: Select all
function PlayAnimDrop()
PauseAnimation("lava_bridge_raise");
RewindAnimation("lava_bridge_drop");
PlayAnimation("lava_bridge_drop");
-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection82");
BlockPlanningGraphArcs("Connection83");
EnableBarriers("Bridge");
end
-- CLOSE
function PlayAnimRise()
PauseAnimation("lava_bridge_drop");
RewindAnimation("lava_bridge_raise");
PlayAnimation("lava_bridge_raise");
-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection82");
UnblockPlanningGraphArcs("Connection83");
DisableBarriers("Bridge");
end