Event triggering for 2 locations

kn1000a

Golden Vampire Flandre
Veteran
Joined
Dec 21, 2017
Messages
37
Reaction score
2
First Language
English
Primarily Uses
RMVXA
Hello, I would like some clarity on a scene I want to make. Here is the chronological steps of the scene:

1. PC is given a quest. Quest requires getting 2 items, one from each different location.
2. PC gets the first item, a unique message/dialogue follows.
3. PC gets the remaining item, a unique message/dialogue follows.
*PC can start at either location.

Implementation:
- For testing purposes, "PC is given a quest" = PC touch an event, switch "tesrt" will be ON.
- The item the PC is "getting" is just an event page with variable "tesrt" +1. The PC can just touch the event to increase this variable (this event exists in both locations).


- Each location will have the same Parallel Process event, a total of three pages.
3rd page:

2nd page:

1st page:


Here are the event processing in chronological order:
1. When PC receives a quest, switch "tesrt" will be ON.
2. PC goes to either location and "retrieve" the item (variable +1 = 1). Parallel Process event checks conditions for page 1 (false), page 2 (false), and page 3 (true). Dialogue is shown, the switch turns OFF, event erased.
3. PC goes to the remaining location, "retrieve" the item (variable +1 = 2). Parallel Process event checks conditions for page 1 (false), page 2 (true). Self-switch A is ON, event erased.



Now, whenever the PC traveled to either of these location again, Parallel Process event checks conditions for page 1 (true). Nothing to execute, so it doesn't do anything.

Except, that's not how things go. Coming back to either location shows the dialogue of page 2 again. It is as if the Parallel Process event "forgot" it already has self-switch A to ON. Why is that the case? How do I stop the events from running ever again after PC retrieves the second item?

I would also like suggestions as to how I can improve the implementation. I wonder if there is a more efficient way for this kind of scenario. Thank you very much.
 
Last edited:

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
157
Reaction score
227
First Language
French, German
Primarily Uses
RMMZ
Event pages are evaluated from right to left, so first it will see if the conditions for page 3 are met. If not, it will check for the conditions of page 2, and only if no other page condition is met, it will check for the conditions of page 1.


In other words: page 1 should be page 3 and vice-versa.
 

kn1000a

Golden Vampire Flandre
Veteran
Joined
Dec 21, 2017
Messages
37
Reaction score
2
First Language
English
Primarily Uses
RMVXA
@Nolonar I can't believe I made such a basic yet huge mistake. Thank you.

(This thread is solved.)
 

EcchiSamurai

Veteran
Veteran
Joined
Oct 31, 2018
Messages
64
Reaction score
5
First Language
English
Primarily Uses
RMVXA
@Nolonar I can't believe I made such a basic yet huge mistake. Thank you.

(This thread is solved.)
It may be basic but I'm saving this haha I still have trouble with reading the event pages sometimes, so it may be something "basic" but for me, I'm learning as I go, so I wouldn't have found this basic when I first started the game I'm currently working on.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,280
Reaction score
11,685
First Language
English
Primarily Uses
RMVXA
@kn1000a I am at a loss as to why you are doing this in such a complicated way, with parallel processes and multiple events. Parallel processes should only be used when needed, because even a single badly designed one can kill your game with lag.

What I would do is this.
On the event page where the player finds item one (your event #6) where you do +1 to the variable, put a conditional branch like this (my variable id is different to yours because I've already used #3)

1600237926182.png

Do exactly the same thing on the other item.
That's all that you need.
 

kn1000a

Golden Vampire Flandre
Veteran
Joined
Dec 21, 2017
Messages
37
Reaction score
2
First Language
English
Primarily Uses
RMVXA
@kn1000a I am at a loss as to why you are doing this in such a complicated way, with parallel processes and multiple events. Parallel processes should only be used when needed, because even a single badly designed one can kill your game with lag.

What I would do is this.
On the event page where the player finds item one (your event #6) where you do +1 to the variable, put a conditional branch like this (my variable id is different to yours because I've already used #3)

View attachment 160885

Do exactly the same thing on the other item.
That's all that you need.
That is... true. I didn't even need any parallel process events. I guess in my mind I was too fixated on leaving each "job" to a different event rather than piling them onto one another.

Thanks, this is my first time making a game. I did learned the mechanics and picked up some tutorial on this forum, but I guess when I implement things I tend to do it inefficiently due to not seeing the shorter paths.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,280
Reaction score
11,685
First Language
English
Primarily Uses
RMVXA
@kn1000a Don't worry. It takes time to learn the efficient way to do things. You should see the way I did things at first! Cringe worthy.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
150
Reaction score
42
First Language
German
Primarily Uses
RMVXA

kn1000a

Golden Vampire Flandre
Veteran
Joined
Dec 21, 2017
Messages
37
Reaction score
2
First Language
English
Primarily Uses
RMVXA
I can confirm this, and surely so can many others. On that note kn1000a, you should give this a read: https://forums.rpgmakerweb.com/index.php?threads/a-starting-point-for-new-users-v1-2.14727/
It's quite an enlightening essay and contains many general useful tips for budding game designers.
I did, in fact I even read one of the user-made full guide on VX Ace. Of course it can only cover the basics, so messing up and taking convoluted ways is what I expected unfortunately. Thankfully the forum has been super helpful!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I'm hoping to get a call October 1. They should be fully open by then.


With this, all demo dungeon graphics are done.
Eventually I need to make animations...send help.
OcRam demo project is now available at https://ocram-codes.net !!!
mzBaseBody.png added!

Ami
--- Mushroom ---

F.Knight: We runs out the food!
Hero: Anything could eat in this place?
F.Archer: It's a bunch of Mushroom over there. I wonder it's safe to eat.
F.Knight: No worries,we have to fill our inside no matter what it is.
(Hero & F.Knight Eat The Mushroom,After 10 Seconds They Collapse With Foam)

Forum statistics

Threads
103,448
Messages
999,373
Members
134,986
Latest member
Achishaler
Top