Different effects for whether the event is facing toward or away

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
Alright, how to phrase this...?

Is there a way to set it up so you get different effects depending on whether an event is facing the player or away from the player? The events will be mobile so I can't use the actor's facing up, down, left, or right to do this.

I mean... if the event is facing away from the player when it gets interacted with the event gets "destroyed" and changes to a pile of debris but if it is facing the player and touches the player the player gets killed instead.

I'm sorry, but I don't have an event window to show right now because I don't even have an idea where to start in setting this up.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,356
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
you can compare event position to player position to determine where the player stands, then compare that to the event's facing.

However, you can't check the event's current facing (unless it's direction fixed), because it will turn toward the player on action button. That means you have to either set the event's fixed facing in the directional conditional branch, or (if the event is not direction-fixed but turning by parallel process or moveroute) store the last facing in a variable and compare the player position to that.
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
Basically the event is restricted to following hallways and only has certain points it can turn around at. It tries to catch you but can only move forward unless at one of those points.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,356
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
that will result in a bit of more complex coding, because you have to use event touch as a trigger, and then use the player position to check wether the player touch is from beyond - all the while using different code for movement decisions.

Please check Tsukihime's blog for event scripts - if I remember correctly, she has one script that allows an event to process a parallel page at the same time than a regular event page. This would probably be the easiest way to make the event, because if you have to do the contact checks in the same event page as the parallel movement, then that page is going to be really tricky to write...
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
you can compare event position to player position to determine where the player stands, then compare that to the event's facing.
I simplified the problem to assuming the event will be adjacent to the player.


This allows me to simply check directions.


Different story if you can trigger events from several tiles away (for example, diagonally)
 
Last edited by a moderator:

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,828
Reaction score
445
First Language
English
Primarily Uses
No, vertical and horizontal only...

If you are to either side of the event it notices you and turns towards you, otherwise it runs in straight lines. Hit it from behind to destroy it, it touches you otherwise and you die.

Sorry, my cousin's cat just died right in front of me and there was nothing I could do... I just finished getting him ready for my uncle to bury when he gets home...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top