USING VARIABLES FOR X AND Y?

Posts

Pages: 1
SunflowerGames
The most beautiful user on RMN!
13323

I want an event (and sometimes multiple) where the player dies when he touches a moving monster (But I don't want this triggered by player touch or event touch.) I have never attempted to do this before, but I tried my best to emulate what I think the event pages should look like. Here is what I managed to do, but doesn't work.







No, it looks like the event that checks to see whether the hero is touching the enemy.

The way it's currently set, it checks to see if the hero is on top of the enemy, not next to it. I don't know why you have an aversion to the On Player Touch trigger - this is practically what it's made for.

The other way to do this is much longer. It involves checking character facing direction (and monster, too, if you want to have it trigger when the monster touches the hero) as well as checking if the hero is actually next to the enemy, instead of on top of it - that is,
If Hero X= (Monster X- or + 16)
If Hero Y= (Monster Y- or + 16)
If Hero Direction Facing Up/Left/Right/Down, depending on their placement (so if Hero X is = Monster X- or + 16, then check the facing left or right) and then doing to for the monster facing too...

It's a lot more work and has a lot more potential to fall apart. Is there a specific reason you don't want to use the On Hero Touch? Like I said, it's practically built for this kind of encounter system and it's also monster exclusive, meaning you won't have to do the above formula for each and every monster on the map...
As Liberty said, it checks if the player is on the exact same tile as the monster.
If you're aiming for how it worked in Chips Challenge, this is good. It will require the monster to be able to walk through the player and not walls, though. Setting the priority of the monster to Below Character should fix this, I believe (correct me if I'm wrong).
SunflowerGames
The most beautiful user on RMN!
13323

I think I may have figured it out.

I couldn't use event touch due to the gravel in Chips Challenge.
The monster shouldn't be able to kill you if you are on the gravel but standing directly next to it (I think if I remember correctly, can't actually replay the game because my Windows version is the wrong bit.)

The problem was that I needed the game to continue checking the X and Y in a parallel process. In my event above that parallel process is turned off by a control switch. I haven't tested it yet, but this should also fix my problem with having enemies go through each other, but killing the character if they touch him.

Pages: 1