#How to give entity a target?
1 messages · Page 1 of 1 (latest)
Is this possible in any fashion, no matter how hacky?
you could use Entity.prototype.applyImpulse() to make the entity move towards the other entity
custom entity?
why include prototype
that is how you specify that the method is supposed to be run on an actual instance of an entity and that is not a static class property
you don't include it in the actual code
That's an interesting way haha, good thinking. It'd be a lot of overhead work to simulate 'following' behavior, but I think it could make a functional backup plan
if it is a custom entity there is a lot of ways
either damage or tame
Ahh, but here's the kicker...the entity is floating/flying!
Apparently none of the typical ways work, at least not for me. I can get the target, but nothing will make the flying/floating entity move towards the target. Any ideas?
the applyImpulse method should work
So I'd basically simulate the entire concept of 'movement' and 'following' for the entity? Interesting, that might actually work haha
To simulate fluid motion, that would require a lot of micro-nudges, and thus, a lot of overhead. I wonder if there's some more refined way to do this 🤔
I had meant just constantly making the entity move directly towards the target
get the entity from view direction then spawn the entity you want, apply damage your entity caused by entity from view, may it works
why apply dmage!? they just wanted the entity to follow the other entity, not kill it lol
So I was able to give it a target relatively easily with tags and using 'nearest_attackable_entity' component. However, a flying/floating entity doesn't seem to be able to approach it's target (broken components?). I was able to confirm it targetting & attacking the target when I gave it ranged attacks, like the ghast.