Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by BennyT

Currently working on a game where there are certain items that can be equiped by either the player entity OR the enemy at any given time. Once either entity owns/equips it, it will only become available again once it has been dropped (either by choice or due to an attack).

What is the best way to execute this:
- Have the player/enemy entity have the collidesWith function check if the collision is with the item entity
- Have the item entity check to see whether or not it is a player or enemy entity and assign that entity as its "owner"

The trouble I am having at the moment is that I can get the player to pick it up no problems using the first concept, but the enemy won't pick it up or even register the collision.

I am also using Impact-Bootstrap by Jesse Freeman if that helps (or anyone has experience with it and this particular problem)

1 decade ago by Joncom

If you want to know why your enemies aren't interacting with items.
Please share enemy.js and item.js ...
Page 1 of 1
« first « previous next › last »