Variable/Switch combo error

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
mkay folks, this outta be an easy one :p

Scenario: You talk to an NCP. NCP tells ya that he's currently waiting for his gf so they can go somplace special. (this adds a variable of 1. Talk to him 10 times this triggers a cutscene) At 10, gf walks in (triggered on another tile) comes up to him, they kiss and then she stands to the side of him. You talk to both of them and find out that the bf is busy reading and they will depart shortly (a different variable is added) the gf is all to excited to leave (same variable added. It adds up to 15 and another cutscene) Then they leave.

Problem: I talk to the bf and he is stuck on the first part. He never transitions to the first cutscene.

Code:

Bf: Page 3:player Touch@>Text: 'Actor5',0, Normal, Bottom: : blahlbah blah gf is on her way@>Control Variables: [0092:Gf Variable] = 1Page 2:Autorun, Variable:0092(10 or above)@>Control Switches: [0090: Ready to go?] = ON@>Wait: 300 frame(s)@>Show Balloon Icon: Event, Heart@>Control Variables: [0093: Ready to go?] +=1Page 1:player Touch, Variable:0093(3 or above)@>Text: 'Actor5', 0, Normal, Bottom: : Figures she'd get here when I'm in the middle of a good read. Yeah we're almostready.@>Control Variables: [0093: Ready to go?] +=1
Code:
Gf:Page 3:Autorun, Switch:0090 is ON, Variable:0092(10 or above)@>Conditional Branch:Player is facing down (in case I'm in front of the bf on the path the gf is supposed to walk)@>Transfer Player:blahblah to the left one space facin right@>: Else@>: Branch End@> Set Move Route: This Event(wait):  :$>Wait: 60 frame(s):  :$>Graphic: 'Actor4',5:  :$>move to bf@>Show Balloon Icon:Event, Heart@>Control Variables: [0093: ready to go?] +=1@>Control Switches: [0090: Ready to go?] = OFFPage 2:Autorun, Variable:0093(2 or above)@>Set Move Route:This Event(wait):  :$>move route@>Control Variables: [0093: Ready to go?] +=1Page 1:Player Touch, Variable:0093(3 or above)@>:Text: Blah blah blah so excited@>:Control Variables: [0093: Ready to go?] +=1
there's supposed to be more but at this point I tested it out and it don't work. sooooo can someone help?

thank you kindly
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
You are assuming the second variable that you are using automatically starts at 10. It doesn't work that way. If there are two variables, then they work independently unless you manually set up the other variable to whatever you need it to be. You cant make one variable go up to ten then assume that the other is going to see that then go to 10 as well.

It looks like there is a mix up on the BF with variables 93 and 92. But it's tricky to read because of how you laid it out.

On page one the player touch for 93 has to start at 3. What is pushing the variable here to make it 3?

On page 2 I see variable 92 and not 93...
 
Last edited by a moderator:

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
You are assuming the second variable that you are using automatically starts at 10. It doesn't work that way. If there are two variables, then they work independently unless you manually set up the other variable to whatever you need it to be. You cant make one variable go up to ten then assume that the other is going to see that then go to 10 as well.

It looks like there is a mix up on the BF with variables 93 and 92. But it's tricky to read because of how you laid it out.

On page one the player touch for 93 has to start at 3. What is pushing the variable here to make it 3?

On page 2 I see variable 92 and not 93...

because the interpreter reads the first page, i put everything in reverse so that it would be read. I take it that was a bad idea?
 
Last edited by a moderator:

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
Yeah, it's alright to start with page 1 as being the first event,  you just have to create specific conditions so that those pages will not be read until their conditions are met. Since the interpreter does read in reverse order, it is easier to just make pages 3 and 2 with conditions while leaving page 1 with no conditions. This way, when you flip the switches or variables on page 1 which are required for page 2 to be read, once the interpreter goes back into the events pages, it will stop at 2 since that is what will be recognized first. I think I could explain this better but for now, try to stick with this example if it helps:

You are looking for a blue dot. You start from the last page to the first page looking for this blue dot. When are you going to stop looking? Right when you find the blue dot. The very first time you spot the dot, you're going to ignore everything else and focus on that dot. So if there is a dot on page 3 and page 1. It will stop at page 3 because that is what it recognizes first. It will not bother with page 1. It's a weak example but yeah...

If the event is stuck on one page, that is probably because it is higher up in page numbers and taking priority because its conditions are continuing to be met. So it feels no need to go further down the line.
 

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
You are assuming the second variable that you are using automatically starts at 10. It doesn't work that way. If there are two variables, then they work independently unless you manually set up the other variable to whatever you need it to be. You cant make one variable go up to ten then assume that the other is going to see that then go to 10 as well
So then What should I do about this problem? If i have it so that he uses the variable system to 10, how do I make her recognize this SAME variable system is at 10 and start her events so they continue to chain off of eachother

Yeah, it's alright to start with page 1 as being the first event,  you just have to create specific conditions so that those pages will not be read until their conditions are met. Since the interpreter does read in reverse order, it is easier to just make pages 3 and 2 with conditions while leaving page 1 with no conditions. This way, when you flip the switches or variables on page 1 which are required for page 2 to be read, once the interpreter goes back into the events pages, it will stop at 2 since that is what will be recognized first. I think I could explain this better but for now, try to stick with this example if it helps:

You are looking for a blue dot. You start from the last page to the first page looking for this blue dot. When are you going to stop looking? Right when you find the blue dot. The very first time you spot the dot, you're going to ignore everything else and focus on that dot. So if there is a dot on page 3 and page 1. It will stop at page 3 because that is what it recognizes first. It will not bother with page 1. It's a weak example but yeah...

If the event is stuck on one page, that is probably because it is higher up in page numbers and taking priority because its conditions are continuing to be met. So it feels no need to go further down the line.
makes sense enough :p
 

CWells

Storyteller/Artist
Veteran
Joined
Apr 22, 2013
Messages
731
Reaction score
40
First Language
English
Primarily Uses
You are assuming the second variable that you are using automatically starts at 10. It doesn't work that way. If there are two variables, then they work independently unless you manually set up the other variable to whatever you need it to be. You cant make one variable go up to ten then assume that the other is going to see that then go to 10 as well
So then What should I do about this problem? If i have it so that he uses the variable system to 10, how do I make her recognize this SAME variable system is at 10 and start her events so they continue to chain off of eachother?

You are going to have to use two variables for this. See, the thing is, when events are checking a variable, the only options for an event page is: If (number) OR GREATER. There are no options for If and only if (number) or if (number) and lesser. So if you were to try to tie up these two events and have one variable activate an event at 3 and the other at 4, you might run into some issues using only a single variable because there will be multiple things going on at one time. Just make a separate variable for the other part of this event and you'll be alright.
 
Last edited by a moderator:

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
So then What should I do about this problem? If i have it so that he uses the variable system to 10, how do I make her recognize this SAME variable system is at 10 and start her events so they continue to chain off of eachother?

You are going to have to use two variables for this. See, the thing is, when events are checking a variable, the only options for an event page is: If (number) OR GREATER. There are no options for If and only if (number) or if (number) and lesser. So if you were to try to tie up these two events and have one variable activate an event at 3 and the other at 4, you might run into some issues using only a single variable because there will be multiple things going on at one time. Just make a separate variable for the other part of this event and you'll be alright.
can you give an example so I can see this at work. I already have 2 variable bouncing off eachother. by what you're sayin I'd need another 2 :(
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Event pages are checked in REVERSE order.


Page 1 should be what you want to happen first, with no conditions.


Page 2 should be what you want to happen after the first lot of conditions is met.


Page 3 should be what you want to happen after the second lot of conditions is met.


However, I dislike the way you are going about it. Using lots of pages, with autorun triggers and switches to change between them, invites trouble. You can do the whole lot in just one or two event pages. Since talking to the first NPC is what triggers the whole thing, you can put EVERYTHING in that one event page. Set Move Route will let you move OTHER events around too, not just the player or the current event.


Take a look at the blog article called NPCs are not events (or the other way around). It walks through a simple way to do this.
 

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
It's working. Now i just have to finish the scene with them leaving. It forces the cutscene now to my chagrin, no matter where you are in the room after a 900 frame wait but i can work with that I suppose until I figure out how to make it do EXACTLY what I want. I suppose I'll leave this open if I have any more problems with this scene lol thanks everyone, Shazz you were right :p it did free up a lot of space doin it on a few pages, and connectin it to other events. Didn't know I could do that :p
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
"It forces the cutscene now ..." to what? To repeat? That's because you've got it set to autorun and aren't turning it off. At the end of the cutscene, turn on a self switch, then add a new page conditioned by that self switch, but leave everything else as default. But I still don't see anything in your scene that would require an autorun.


If it's something else - I don't know, I can't guess.
 
Last edited by a moderator:

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
oh no... no autorun, I did what you said shazz. NO I have a wait on 900 when it hit the switch to the next page, and then it causes a cutscene after that so no matter where I am in the room that cutscene is gonna happen, unlike what I wanted where I'd talk to the bf 10 times and on the 10th it caused the cutscene. I'll figure it out I hope :p but it runs smoothly otherwise
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I would still put the cutscene on the same page. Add 1 to the variable. Do a Conditional Branch to see if the variable is 10 or more. If it is, do the cutscene, turn on a switch, and add a new event page for what the NPC will do when you talk with them AFTER the cutscene has happened.
 

the Skye Mage

E=MC Squire
Veteran
Joined
Dec 30, 2012
Messages
154
Reaction score
5
First Language
english
Primarily Uses
That was my original method and it didn't work. I'd just keep talkin to the bf over and over and over. Something about Conditional Branch to 10 or more just doesn't wanna work on my cutscene. I had it so that the switch would be pulled on the conditional branch on page one, the cutscene would happen, and everything leading up to page 2 where you can talk to them afterward. Just didn't wanna work.

*edit: just retried it. yup, still ain't workin
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Then show us screenshots of your events (entire window, all tabs), because you've got something missing or misplaced.


Your original method had the pages the wrong way around. Did you fix that?
 

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,858
Messages
1,017,023
Members
137,565
Latest member
Callmelogann
Top