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.

Event Perils

I'm trying to make it so that the enemy will pursue the player on the map, except when they are on a specified tile ("shadows").
I had it so they would only pursue the player when Variable X was equal to 0, and when you stood on these tiles it would increase, and the enemy would wander off for a while. I also tried the opposite; enemy would pursue when Variable X was equal to 1, and stop when it decreased. Now, I actually succeeded with this method, but then I went to tweak something and broke it. I can't remember exactly what it was I had, but it was something along those lines... This is what I have now (btw, I already changed the "Move Player" to "Move Fishermen, so ignore that):

http://i250.photobucket.com/albums/gg24 ... perils.png[/img]

Does anybody know what to do? :(
 
shiroun":2pro122i said:
Wouldn't you uhh... set it to move towards player?
It is set to "move towards player", I changed who was moving.

If you mean changing "Random" to "Approach", it's basically the same problem, instead of moving randomly and never noticing you, he's always following you and never goes away.
 
I see your problem... the event is on Event Touch, so it will only move away WHEN it touches you. So basically, it will touch you, walk one tile away, then continue chasing you...

What you want to do is create another event on the map, and make it a Parallel Processing. Have THAT event check the variable, and do all the move functions for the fisherman. Then on the fisherman event, have it set to Event Touch, and have the catching part of the event on there.

By the way, you don't even have to use variables here. In the Database->Tilesets tab, you can set Terrain Tags. Instead of checking a variable, you can check a Terrain Tag, which may save some eventing.
 
I tried what you suggested but it didn't work, though I might not have done it right, I wasn't too sure.

How do the Terrain Tags work exactly? I'd like to make it so when you're on this one tile, enemies can't "see" you.
 
Set the monster to "Approach"

Create another invisible event. Set it to Parallel
Code:
@>Control Variables: [0001: player terrain] = Player's Terrain Tag
@>Conditional Branch: Variable[0001: player terrain] == 1
   @>Set Move Route: [EV001](Repeat Action)
    :                       : $>Move at Random
   @>
  : Else
   @>Set Move Route: [EV001](Repeat Action)
    :                       : $>Move toward player
   @>
 : Branch End
@>

Now, just go to your tileset, and set the 'shadow' terrain tag(s) to 1
 

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