Parallel Interrupt

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
Unsure how to do this. Or at least how to process this.

Say I want to have a sleeping guard that has the "ZZZ" bubble above his head so players know he's sleeping. If they interact with him, they get a text box that has him mumbling info before resetting back to his sleeping state.

To have him with the sleeping bubble, I use Parallel process. This makes sense but then I'm stuck in how do I break it out of that even before going back to it. I suppose I could have events next to him that flip a switch on the Sleeper's event to shift him out of Parallel but that could be adding in far more events than I want.

Ideas?
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
861
Reaction score
2,022
First Language
Not English
Primarily Uses
RMMV
So you want to have one event and you can't figure out how to interrupt it when the player interacts?
I guess you can check for the player and the guard's distance in the same parallel event.
You can store the distance in a variable like this:
Code:
$gameVariables.setValue(x,$gameMap.distance($gameMap.event(this.eventId()).x, $gameMap.event(this.eventId()).y, $gamePlayer.x, $gamePlayer.y));
Or you can just skip the variable and do this:
Code:
var dist= $gameMap.distance($gameMap.event(this.eventId()).x, $gameMap.event(this.eventId()).y, $gamePlayer.x, $gamePlayer.y);
if (dist==1 && Input.isTriggered('ok')){
$gameSelfSwitches.setValue([this._mapId, this.eventId(), 'A'], true);
}
When the distance is 1 AND when player presses enter (you want to check for interaction), you can turn on a self switch which takes you to a new event page where the guard is awake/mumbles stuff. After the show text, turn the self switch off. Now the guard should go back to sleep.
There might be an easier way but this is what I can come up with now.
 
Last edited:

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
So you want to have one parallel event and you can't figure out how to interrupt it when the player interacts?
I guess you can check for the player and the guard's distance in the same parallel event.
You can store the distance in a variable like this:
$gameVariables.setValue(x,$gameMap.distance($gameMap.event(guard).x, $gameMap.event(guard).y, $gamePlayer.x, $gamePlayer.y));
When the distance is 1 AND when player presses enter (you want to check for interaction), you can turn on a self switch which takes you to a new event page where the guard is awake/mumbles stuff. After the show text, turn the self switch off. Now the guard should go back to sleep.
There might be an easier way but this is what I can come up with now.
Actually I figured out a work around after sitting there looking at it and going "Oh wait. I'm dumb."

I simply put an event on the floor(Below player) and had that intractable. When stepping up to the Guard, a player will try to talk and get the Ground event to fire instead.

Still might want to ask this question sooner or later. I've only used Parallels to move more than one event at a time.
 

Ace of Spades

Veteran
Veteran
Joined
Jan 19, 2017
Messages
138
Reaction score
202
First Language
English
Primarily Uses
So when you say the player interacts with the guard, do you mean they walk up and press the action key, then he plays his message? If that's the case, just turn on a switch right before the message plays, and turn it back off after the message. On your Parallel Process event that's playing the sleeping emote, have a 2nd blank page that activates when the switch is On.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,971
Reaction score
13,604
First Language
English
Primarily Uses
RMMV
I would have just done a script call in the autonomous movement for the Zzz bubble, and left the event with an action button trigger, the mumbling, then ended with a Set Movement Route back to the Zzz bubble again, set to repeat.

No extra event, no parallel process.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Shaz means this on Line 96 of the Scriptcall list. This List is very helpful.
Code:
character.requestBalloon(id); this.setWaitMode('balloon');
Replace character with one of these: $gamePlayer; $gameMap.event(ID);
For example: $gameMap.event(6).requestBalloon(3); this.setWaitMode('balloon');
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,968
Reaction score
1,410
First Language
EN
Primarily Uses
RMMZ
Shaz means this on Line 96 of the Scriptcall list. This List is very helpful.
Code:
character.requestBalloon(id); this.setWaitMode('balloon');
Replace character with one of these: $gamePlayer; $gameMap.event(ID);
For example: $gameMap.event(6).requestBalloon(3); this.setWaitMode('balloon');
Note that the this keyword is context-dependent. In a move route script, this would be simply:
JavaScript:
this.requestBalloon(3);
 
  • Like
Reactions: Bex

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
And now I can't seem to figure out how to move away from Parallel firing event.

20200813184006_1.jpg
What happens is that the guard has a sleeping icon above his head while the group runs around. But no matter what I do, this process will continue to run. That's fine it's what I want.

But then say I want the guard to wake up, or remove his model after a fight. Nope. Parallel keeps firing. Even with the Erase event command it's still firing. Does Parallel superseded everything else? How do I actually stop this?
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
861
Reaction score
2,022
First Language
Not English
Primarily Uses
RMMV
You should do what Shaz said and use Custom autonomous movement instead of parallel. Much easier.
But considering your issue, turn on a self switch and make a new event page with that self switch as condition.
 

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
You should do what Shaz said and use Custom autonomous movement instead of parallel. Much easier.
But considering your issue, turn on a self switch and make a new event page with that self switch as condition.
I tried that. Didn't work. No matter what page I sent the event to, the bubble that was on the Parallel process would remain.

I could try the scripting method but might also have to rework the entire set up now.
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
861
Reaction score
2,022
First Language
Not English
Primarily Uses
RMMV
Can you post screenshots of every page related to this system? There's got to be something wrong somewhere.
 

MerlinCross

Veteran
Veteran
Joined
Jun 8, 2015
Messages
208
Reaction score
88
First Language
English
Primarily Uses
Can you post screenshots of every page related to this system? There's got to be something wrong somewhere.
*flip table*

Oh it works now. Grumble grumble grumble. Must have been just small but important piece I didn't flip on or put the right number in to the point I missed it the first ime around. Setting it up a second time seems to have worked.
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
861
Reaction score
2,022
First Language
Not English
Primarily Uses
RMMV
XD Pay attention to variable numbers/self switches. People make lots of silly mistakes if they don't and run around thinking what's wrong for a long time ^^ Anyways, good to know it's solved.
 

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

Latest Threads

Latest Profile Posts

Dad's watching a WWII documentary while I work on some cool assets for my games. I just love RPG Maker!
Also Happy Halloween! Dad's friend won't be coming unfortunately, but Dad will still be taking me to Boxi Park to have some fun tonight! I'll be posting a video on my YouTube channel of the show, and I'll be sure to post a link here.
"Nightmares exist outside of logic and there's little fun to be had in explanations. They're antithetical to the poetry of fear. In a horror story the victim keeps asking why, but there can be no explanation and there shouldn't be one..." - Stephen King
I feel people seek explanation and demand it sometimes in games, but in the horror genre, well, maybe you shouldn't have one. Silent Hill 1 comes to mind...
Managed to implement QSprite.

Always double check your plugin order.


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?

Forum statistics

Threads
104,680
Messages
1,008,062
Members
136,169
Latest member
raspudin32
Top