Collision with pacing enemy
butterbean
Member Posts: 4,315
So I have an enemy that paces back and forth in a platformer game, but if my main player happens to walk into him before shooting him, I wanted the enemy to keep pacing as normal.
As of now, he gets pushed back, and his velocity increases momentarily, and moves him to another position where he will pace back and forth.
So is it possible to make it so when the player touches the enemy, that he continues to pace without being moved?
As of now, he gets pushed back, and his velocity increases momentarily, and moves him to another position where he will pace back and forth.
So is it possible to make it so when the player touches the enemy, that he continues to pace without being moved?
Comments
1) MAke the enemy non-collidable
2) Use the move function
3) Add the velocity of impact from your main player to that of the enemy opposite the direction the enemy's attack from. Might be a tad trickier.
this might be trickier than I thought, but I've seen it done in other platformers all the time.... maybe changing the physics of the enemy or tweaking with the numbers will help with it?
also, in the event that you have a player with 3 health bars and they collide or
overlap with an enemy , I probably need to create an invincibility Rule for the main actor for about 3 seconds so they don't get consecutively right?
So here's what I did, instead of adding the attribute collide with: "enemy" and in the enemy actor, putting collide with: player
I just created a rule under the player that if collides/overlaps with "enemy", take damage
Is that how you created your rule?