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.

Enemies Don't Move Until You Come Near Them.

This has probably already been done, but I didn't know what it was called. Has anyone ever played the game Earthbound? In it, enemies stay pretty stationary on the map (with the exception of just a little movement here and there) until the player moves near them, then they run towards the player and if the two touch, the battle begins.

Is there some way I can make the enemies stay in the same general area until a player comes nearby, and then they follow?

Thanks,
Tillman
 

Dami

Member

Tillman said:
Do you know how to use that script... and if so, can you explain it? I've got it installed, but I'm pretty lost after that.

I recommend you to download the demo and open the monster event so you can see for yourself.

Basically you have to create an event with 2 pages. Page 2 must have Self Swich A ON, and in page 1, set it to parallel process, create a command "Call Script" and paste this:

Code:
$view_range.enemies_view(6, 5, "A")

Number 6 is the EVENT ID, you have to change it to whatever number is the ID of the event.

Number 5 is the VIEW RANGE.

And the "A" is the Self Switch that is activated when the event detects you.

So if you want to start a battle when the event colision with the player:

In page 2 set the type of movement to approach and trigger Event Touch. Finally set a command to start a battle.

Again I recommend you to copy the monster event in the demo, It has aditional features, it makes the event disappear if you win the battle, if you escape the event waits a few seconds and then starts to chase you. Also if you win the event fades away.
 
Do you happen to have the demo?? The links in that thread aren't working, they link to search engine sites. I think I can handle it from what you've told me, but having the enemies wait before chasing you after escaping sounds nice. Thank you so much!
 
Page 2 must have Self Swich A ON, and in page 1, set it to parallel process, create a command "Call Script" and paste this:
That will lag your game to hell if you use it constantly with enemies :eek:

Instead, try making just one parallel process on the map. Put all those commands in there, and a really short wait delay afterwards. Should still work and you'll have a huge improvement
 

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