Actor Stunned mullet after taking damage?
![craziwolf](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
In the game I have been developing the enemy actor gets pushed back when struck by player actor. It does not die because I gave each enemy hit points but when it is hit the first time it stops perusing the player.
Any help would be appreciated!
Any help would be appreciated!
Answers
on enemyActor prototype:
- delete the collideBehavior
- add attribute … index type … name: maxHits = number of hits for this enemy
Rule: when
Event: overlaps or collides with actor of type: player
- changeAttribute: self.maxHits To: self.maxHits-1
- Interpolate: self.Position.X To: self.Position.X+100 Duration: 0.1)
Otherwise:
Rule: when
Attribute: self.maxHits > 0
- pursue behaviors
Otherwise:
- destroyBehavior … or the deadEnemy stuff
@};- MH