Aller au contenu

Photo

Need help with cusotm function - GetIsStuck


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Shadooow

Shadooow
  • Members
  • 4 474 messages
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

#2
Xardex

Xardex
  • Members
  • 217 messages
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 .


#3
Shadooow

Shadooow
  • Members
  • 4 474 messages
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.

#4
Xardex

Xardex
  • Members
  • 217 messages
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.

#5
FunkySwerve

FunkySwerve
  • Members
  • 1 308 messages
Here's the thread Xardex was thinking of:
Click Me

Funky