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 harryfeng

Hello:

I need some suggestions how to create such an entity: A window have 2 sprite animation, open and close. When the window is open, there will be an monster standing there. And this monster can kill the player.

I am thinking:

1. if window in sprite 1(close state), add monster animate.(how to detect sprite state?)

2. monster check againest the player. (but how to stop killing the window too?)

thanks for suggestion.

1 decade ago by Joncom

Perhaps consider having two seperate entities for this.

1. Window entity.
2. Monster entity.

Your window would then still have it&039;s open/close animations, but when the window happens to open, you could then make a call to #ig.game.spawnEntity() to create the monster.

This would take care of your window entity being killed when you only want to kill the monster.

1 decade ago by harryfeng

thanks, I will try that. :)
Page 1 of 1
« first « previous next › last »