Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Hitting enemy events

I was wondering if there was a way to press the "action" key when wandering around a dungeon and have the player character swipe a sword so that an enemy event would register a hit. This would ideally be used with pixel movement, but the idea is that the wandering enemy would be "knocked out" so it would stop chasing you. The catch is that it would not be used in the vein of something like XAS, but simply to register hits and not to damage the enemy in any way. After the player touches the enemy, it would initiate a battle with whatever system you are using (using eventing).
 

Atoa

Member

Making that compatible with pixel movement would be kinda hard.
You could search for evented abs, and see how the enemy hitting works, and then adjust the events to react according (like turning on an local switch for a while to change enemy event behavior).
 
Thanks, I found out that it's definitely possible only using events. Now I see that it basically involves 1 common event to calculate where the player is, 1 for the player's action when the button is pressed, and 1 for the animation. The rest can be done on the enemy event itself and the knocking out would use a timed self-switch. All I really need is 8 direction movement, dunno if it will work with that, but having 4 direction movement is lame.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top