Changing the Trigger type of an event page, or using two different Triggers at the same time.

Joined
Dec 24, 2018
Messages
59
Reaction score
3
First Language
Finnish
Primarily Uses
RMMV
Is there a way to either change the type of a trigger an event page has, or maybe run two event pages simultaniously?

What I'm specifically trying to do here is to have patrolling NPCs, that will chase the player once seen, and on touch initiate a battle, but if the player manages to press a button behind an NPC that hasn't spotted him, the NPC will die without a battle.
I'm using yanfly's Event Encounter Aid and Event Chase Player, and can manage both of these seperately, but haven't been able to get these to work simultaniously on an NPC.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
Just have your button turn on a switch, and add a final page to the NPC conditioned by that switch, so he'll disappear when the button is pressed.
 
Joined
Dec 24, 2018
Messages
59
Reaction score
3
First Language
Finnish
Primarily Uses
RMMV
Just have your button turn on a switch, and add a final page to the NPC conditioned by that switch, so he'll disappear when the button is pressed.
Man, thanks! Didn't even notice I could do that, thought that seemed a bit weird.
Another issue though, I would like for a dead guard sprite to take it's place, and at the moment the new image doesn't show on the map. If I change the image to the "walk" sprite of any other character the change does work though.
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
Try checking the Direction Fix box on the page with the down sprite.

Ace and MV do some funny stuff when changing event pages - under certain conditions it won't change the facing direction of the sprite, so if your 'down' sprite is not on the same row as the 'walking' sprite at the time you change pages, it won't show correctly.

Does your code above work? For Player Touch, the event will turn to face the player before any of the event commands are executed. You would need another script to stop that happening so you could check if the player is facing the event's back, otherwise by the time that command gets run, the player and event will be facing each other.
 
Joined
Dec 24, 2018
Messages
59
Reaction score
3
First Language
Finnish
Primarily Uses
RMMV
Try checking the Direction Fix box on the page with the down sprite.

Ace and MV do some funny stuff when changing event pages - under certain conditions it won't change the facing direction of the sprite, so if your 'down' sprite is not on the same row as the 'walking' sprite at the time you change pages, it won't show correctly.

Does your code above work? For Player Touch, the event will turn to face the player before any of the event commands are executed. You would need another script to stop that happening so you could check if the player is facing the event's back, otherwise by the time that command gets run, the player and event will be facing each other.
Already tried with direction fix too and it didn't work, I did have "walking" enabled then aswell though, so maybe that affected it? Can't go check right now.
And yeah, the script works, it's part of yanfly's Event Encounter Aid plugin.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
You could try putting an autonomous move route in the second page, set to not repeat, with a command to turn in the appropriate direction for that sprite. Still won't fix the pattern though.
 
Joined
Dec 24, 2018
Messages
59
Reaction score
3
First Language
Finnish
Primarily Uses
RMMV
You could try putting an autonomous move route in the second page, set to not repeat, with a command to turn in the appropriate direction for that sprite. Still won't fix the pattern though.
Couldn't get it to work with setting it to turn either, so I decided to just brute force it, and added as many "dead" sprites to the spritesheet of the dead guard as the walking sprite sheet has.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
yeah, that's another alternative I was thinking of, but I didn't want to suggest it. People can get it working without having to do that and it's a waste of sprite space. But it works :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top