Author Topic: Need help with cusotm function - GetIsStuck  (Read 322 times)

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Need help with cusotm function - GetIsStuck
« on: September 23, 2011, 02:14:03 pm »


               Im working on custom AI for my boss monster and I would like to handle this lame tactic so if this happen due to the tileset bug, not walkable placeables or even locked bars so player can still shoot him, i would like to *do something*

but the problem is that i dont know how to preferably simply determine that my moster stucked

if anyone here dealed with the same issue I would appreciate your suggestions
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
Need help with cusotm function - GetIsStuck
« Reply #1 on: September 23, 2011, 06:27:22 pm »


               I swear there was a topic about this here some time ago! Cant find it now though...

Check distance from current target and compare with old distance check, check for effects that might hold you in place. If no effects and distance unchanged, do something.

Basically that was how it was solved in the topic I mentioned, however if the mob gets "stuck" moving between some random points... You might want to compare the distance between the two check points or add additional check points to be compared...

Meh, too many vectors... Do tell if you figure out some better way.



EDIT

I seriously edited this post like 7 times fixing my typos.
               
               

               


                     Modifié par Xardex, 23 septembre 2011 - 05:29 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Need help with cusotm function - GetIsStuck
« Reply #2 on: September 23, 2011, 06:48:01 pm »


               That could work, in normal combat the position wont be exactly the same I guess. If stucked on the other hand, should be. Ill try checking the position in heartbeat then, will see how that will work.

Just realized that this will be a bit issue with casters or monsters with special abilities :/ if they cast they wont move their spot.
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
Need help with cusotm function - GetIsStuck
« Reply #3 on: September 23, 2011, 09:22:03 pm »


               If they get completely stuck, yes, the position wont change, but what  I ment earlier is like 'stuck thanks to pathfinding.' Like some ogre runs back and forth behind a fence, unable to get to you.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Need help with cusotm function - GetIsStuck
« Reply #4 on: September 23, 2011, 09:35:35 pm »


               Here's the thread Xardex was thinking of:
Click Me

Funky