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 verycleanteeth

Hi, I'm pretty new to Impact (really great so far!). I've been going through a lot of example games and tutorials but there are two things I can't quite figure out how to do (or if they're possible).

1. I'd like an enemy to fire bullets that can pass through walls but collide with my player. How do I make the bullets ignore walls?

2. Is there a way to do some simple image manipulation on entities? For instance, making an enemy flash white when they are hit with a bullet without needing an additional animation sequence for each enemy?

1 decade ago by munky

Hi there. I'm a beginner too but I think I can give you a few hints:

1. You want to override the .handleMovementTrace() method for your bullet entities (I guess you're already familiar with static/dynamic collisions).

2. Not sure about that one, but I'd suggest you have a look at compositing here or here, especially destination-atop - though this is experimental...

Hope this helps.

1 decade ago by verycleanteeth

Overriding .handleMovementTrace() did it for me.

I was worried with number 2 I would have to go outside impact and find a way to directly manipulate the sprites on the canvas. I'll have to study your links more.

Thanks for the help!

1 decade ago by jizaymes

Correct me if i'm wrong but on #2, couldnt you just trigger a new animation when the collision happens with a timer to set it back afterwards? I'm curious how you ended up doing this.
Page 1 of 1
« first « previous next › last »