Conditional Branch Variable Checking problem

Sepharius

Villager
Member
Joined
Sep 2, 2016
Messages
17
Reaction score
1
First Language
English
Primarily Uses
I've created a skill that you learn from a book, and you keep reading the book to gain experience for the skill.


For that, I have created a variable and linked it to one of my characters stats.


E.g. Skill name = Hypnosis, variable name = Hypnosis, Magic attack changed to "Hypnosis".


Now before I continue, I am not using scripting so forgive any typos but they don't matter because it's using common events.


So when I read the book, I get the common event to do this;


Control Variables: [0001: Hypnosis EXP] += Random No. (1...4)


Change Parameters: [Player], MAT + Variable [0001: Hypnosis EXP]


That works perfectly.


My problem is a conditional branch that levels up the skill if you have enough experience. It's instantly failing despite me having enough EXP.


Here's the script:


Conditional Branch: Variable [0001: Hypnosis EXP] >= 10


 @> (Basically level up the skill)


 ELSE: (Fails)


It's taking me directly to the fail despite Hypnosis EXP being 17, it's driving me nuts.


Any suggestions?

1.png

2.png

3.png

4.png

5.png
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,079
Reaction score
7,049
First Language
German
Primarily Uses
RMMV
please give screenshots instead of typing the contents only - you're missing half the event properties in your description, including very important properties.


that said, two possible problems come to mind immediatly:


1) where do you update the variable 001?


2) does some plugin use variable 001 as well? because plugins take precedence in such cases and you need to use another variable


3) when exactly is that conditional branch checked? we need to see the whole events, that's why screenshots are better.
 

Sepharius

Villager
Member
Joined
Sep 2, 2016
Messages
17
Reaction score
1
First Language
English
Primarily Uses
Added the pictures, sorry about that.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,079
Reaction score
7,049
First Language
German
Primarily Uses
RMMV
I think you mixed up your conditional branch levels somewhere.


The first conditional branch is checking "hypnosis level 1".


If that is false, the else branch checks for "hypnosis level 3"


But I don't see any check for "hypnosis level 2", and I don't see where those switches are controlled.


That is what I would check first, because if they're off then the common event can't work at all.


Additionally, you have a problem with your editor. I strongly advice to make a backup of your project and deinstall the editor, delete the folder where it was installed, and completely reinstall it.


Because if the trigger is set to none in a common event, the condition should be blank in the editor, simply because a conditional switch is only needed for autorun and parallel.


That you have a switch visible there means that something is messing around with the editor, and that might have caused problems in your game as well
 

Sepharius

Villager
Member
Joined
Sep 2, 2016
Messages
17
Reaction score
1
First Language
English
Primarily Uses
Oh man, that can't be good. 


I should've never bought from Steam, thanks.


As for the Hypnosis level switches, they're fine as I've tested them properly. 


It's the variables that are the problem, it keeps saying "You failed the test" when I attempt them.


Thanks for trying though.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,079
Reaction score
7,049
First Language
German
Primarily Uses
RMMV
That is the steam version? There have been four or five people with such an error (conditions visible without being active) in about four years, and they all had the standalone so far. That by the way is why no one ever could pinpoint the source of the editor problem, it is too rare.


But if you have the steam version, then this is most probably caused by a background program interfering, because much more people use the steam version than the standalone (myself included) and this is the first time I heard about such an effect on the steam editor. That is because the steam version has been regularly available at 85% off several times a year and in several humble bundles for as low as 10$, while the standalone on this site rarely got a sale...
 

Sepharius

Villager
Member
Joined
Sep 2, 2016
Messages
17
Reaction score
1
First Language
English
Primarily Uses
Yep, I was a sucker. Same for MV...


Btw I've identified the problem. 


Change Parameters: [Player], MAT + Variable [0001: Hypnosis EXP]


This, right here.


Every time I do that, I thought it would add the randomly generated number.


It added the whole total LOL.


So if Hypnosis EXP was 11, MAT was 11 and it generated a random addition of 4 for Hypnosis EXP, then it would add 15 to 11 instead of 4.


Seems like I'll need another variable to act as a set number.


Just to make sense, here's the fix: 


Control Variables: [0003:Gamble] = Random No. (1...2)


Control Variables:[0001: Hypnosis EXP] += Variable: [0003:Gamble]


Change Parameters: [Player], MAT + Variable [0003: Gamble]
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Are there any vocalists on RPG Maker Forums that would want to sing together in a group, duet or make a whole channel together?
Here it is in all its leggy glory! I apologize in advance.
Suggestion for the name for the new RM, RPG Maker Re-MV (Re-Mastered Version)
A guide on Furry Potatoes.

Forum statistics

Threads
98,176
Messages
950,095
Members
129,473
Latest member
Soulbanana
Top