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.

Overworld Baddies: Attack on Contact [SOLVED]

mawk

Sponsor

First off, yes, I know what a "Player Touch" trigger is.

In my eternal Earthbound fandom (which may need to be quelled, as I can't find a pixelmovement script that works easily with move routes,) I've decided to have enemies scooting around on the overworld, instead of lurking under the tiles or something and not showing hide nor hair until it's time to fight. There's a simple way to event this, although eventually I hope to procure some kind of script that refines their movements a little more than just tracks on an inevitable path towards the player. But I've run into a problem along the marigold path of events:

Alright, so I managed to get a rather stock ghost to move towards the character. And if you touch the ghost, you most certainly fight him. If you run, he is most certainly frozen for about a hundred frames (still working out the exact number,) and you can move in the meantime. If you kill him, he most certainly disappears for a long time before returning to his original position. That all works well.

BUT.

I've noticed that if I stand still, the ghost mills around uselessly instead of fighting me. A lot of you should be familiar with this; the ghost comes into contact, moves another tile up and away, comes back down, maybe wanders off away from you again... I assume he eventually will come into contact with me and start a fight, but the game will be far too easy (then too hard around bosses) if players have to wait for their battles.

What I'm asking is how to get the ghost to touch the player (activating the Player Touch battle) the FIRST time, when he wanders into a tile next to the player or the player wanders into a tile next to him. Here's how the event's set up so far:

Player Touch
Movement Speed: 2 (Slower)
Movement Frequency: 6 (Highest)

Hopefully the solution won't involve turning up the move speed. I like a little more choice than that. I've a sneaking suspicion that Veiw Range might fix it, but this is hardly the right forum; right now, I'm trying to see if there's a simpler method.

Thanks in advance!

EDIT: Well, how odd. I solved it directly after posting this. XD

Event Touch is my friend.

Thanks to all anyway!
 
Have you checked the enemy event's "Through" checkbox?  I think that should do it.

Barring that, you could also use distance formulas to determine the absolute distance between the player and the event, and then initiate if it's equal to 1.  You could also make the event passive until the player comes within a certain distance that way.  Unless that's what the "view range" script does.
 

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