News › Forums › RAIN › General Discussion and Troubleshooting › Animate in Behavior Tree
This topic contains 4 replies, has 2 voices, and was last updated by RyanMitchellGames 5 months, 2 weeks ago.
-
AuthorPosts
-
January 21, 2023 at 12:32 pm #35169
I have no idea what could be wrong where.
I place animate in the root node under a par and it animates. It works exactly as it should.
I place it anywhere else and it does not animate?
Even directly under a waypoint node and it will not animate.January 21, 2023 at 12:34 pm #35170Here is a very simple tree probably wrong in areas but I just want to see animation.
<behaviortree version="1.1" repeatuntil="" name="Basic" debugbreak="False"><parallel tiebreaker="succeed" succeed="all" repeatuntil="running" name="root" fail="any" debugbreak="False"><detect sensor=""close"" repeatuntil="" name="close" entityobjectvariable="formVarClose" debugbreak="False" aspectvariable="aspCloseVar" aspectobjectvariable="mpCloseVar" aspect="hero" /><animate repeatuntil="running" name="animate" debugbreak="False" animationstate="walk" /><detect sensor=""eyes"" repeatuntil="" name="detect" entityobjectvariable="varHero" debugbreak="False" aspectvariable="aspectVar" aspectobjectvariable="mpVar" aspect=""hero"" /><selector usepriorities="False" repeatuntil="" name="selector" debugbreak="False"><constraint repeatuntil="" priority="" name="constraint" debugbreak="False" constraint="varHero != null"><selector usepriorities="False" repeatuntil="" name="selector" debugbreak="False"><constraint repeatuntil="" priority="" name="constraint" debugbreak="False" constraint="formVarClose == null"><parallel tiebreaker="fail" succeed="all" repeatuntil="" name="parallel" fail="all" debugbreak="False"><move turnspeed="" repeatuntil="" name="move" movetarget="varHero" movespeed="2.0" facetarget="" debugbreak="False" closeenoughdistance="" closeenoughangle="" /><animate repeatuntil="" name="animate" debugbreak="False" animationstate="walk" /></parallel></constraint><constraint repeatuntil="" priority="" name="constraint" debugbreak="False" constraint="formVarClose != null"><animate repeatuntil="" name="animate" debugbreak="False" animationstate="walk" /></constraint></selector></constraint><constraint repeatuntil="" priority="" name="constraint" debugbreak="False" constraint="varHero == null"><waypointpatrol waypointsetvariable="PatrolRoute" waypointactiontype="patrol" traversetype="pingpong" traverseorder="forward" repeatuntil="" pathtargetvariable="" name="waypointpatrol" movetargetvariable="" debugbreak="False"><move turnspeed="" repeatuntil="" name="move" movetarget="nextStop" movespeed="1.0" facetarget="" debugbreak="False" closeenoughdistance="" closeenoughangle="" /><animate repeatuntil="" name="animate" debugbreak="False" animationstate="walk" /></waypointpatrol></constraint></selector></parallel></behaviortree>
January 21, 2023 at 12:35 pm #35171<?xml version=”1.0″ encoding=”UTF-8″?>
<behaviortree version=”1.1″ repeatuntil=”” name=”Basic” debugbreak=”False”>
<parallel tiebreaker=”succeed” succeed=”all” repeatuntil=”running” name=”root” fail=”any” debugbreak=”False”>
<detect sensor=”"close"” repeatuntil=”” name=”close” entityobjectvariable=”formVarClose” debugbreak=”False” aspectvariable=”aspCloseVar” aspectobjectvariable=”mpCloseVar” aspect=”hero” />
<animate repeatuntil=”running” name=”animate” debugbreak=”False” animationstate=”walk” />
<detect sensor=”"eyes"” repeatuntil=”” name=”detect” entityobjectvariable=”varHero” debugbreak=”False” aspectvariable=”aspectVar” aspectobjectvariable=”mpVar” aspect=”"hero"” />
<selector usepriorities=”False” repeatuntil=”” name=”selector” debugbreak=”False”>
<constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”varHero != null”>
<selector usepriorities=”False” repeatuntil=”” name=”selector” debugbreak=”False”>
<constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”formVarClose == null”>
<parallel tiebreaker=”fail” succeed=”all” repeatuntil=”” name=”parallel” fail=”all” debugbreak=”False”>
<move turnspeed=”” repeatuntil=”” name=”move” movetarget=”varHero” movespeed=”2.0″ facetarget=”” debugbreak=”False” closeenoughdistance=”” closeenoughangle=”” />
<animate repeatuntil=”” name=”animate” debugbreak=”False” animationstate=”walk” />
</parallel>
</constraint>
<constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”formVarClose != null”>
<animate repeatuntil=”” name=”animate” debugbreak=”False” animationstate=”walk” />
</constraint>
</selector>
</constraint>
<constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”varHero == null”>
<waypointpatrol waypointsetvariable=”PatrolRoute” waypointactiontype=”patrol” traversetype=”pingpong” traverseorder=”forward” repeatuntil=”” pathtargetvariable=”” name=”waypointpatrol” movetargetvariable=”” debugbreak=”False”>
<move turnspeed=”” repeatuntil=”” name=”move” movetarget=”nextStop” movespeed=”1.0″ facetarget=”” debugbreak=”False” closeenoughdistance=”” closeenoughangle=”” />
<animate repeatuntil=”” name=”animate” debugbreak=”False” animationstate=”walk” />
</waypointpatrol>
</constraint>
</selector>
</parallel>
</behaviortree>January 22, 2023 at 8:21 am #35207I’m not sure what you are testing with that tree. As an example, though, your top level animate node is repeating forever. Any of the animate nodes that hit underneath it will be fighting with it and won’t work properly.
January 22, 2023 at 10:38 am #35216Learning process =)… very messed up tree I have it all going well now thanks! Quite a nice design.
And thanks again to you all for all the nav mesh help it worked out great! I now have generated levels with a unified nav mesh!
-
AuthorPosts
You must be logged in to reply to this topic.