How to use stats into conditional branches?

Status
Not open for further replies.

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
90
Reaction score
26
First Language
Portuguese
Primarily Uses
RMVXA
Basically...I want to use the "atack" stat in a conditional branch with battle processing...so for example..if you have more than 10 atk you kill the enemy instantly just by touching the enemy overworld sprite....otherwise you engage in battle normally...

Edit: Sorry...I've figured it out...the moderators can close this topic if you want
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,837
Reaction score
7,897
First Language
German
Primarily Uses
RMMV
basically control variable to get game data, then conditional branch on the variable
 

Zero_G

Veteran
Veteran
Joined
Mar 28, 2020
Messages
43
Reaction score
29
First Language
English
Primarily Uses
RMVXA
If you are going to use those type of conditional branches a lot, Conditional Branch+ plugin is recommended
 

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
90
Reaction score
26
First Language
Portuguese
Primarily Uses
RMVXA
basically control variable to get game data, then conditional branch on the variable

Yeah...that's what I did...it worked perfectly...


If you are going to use those type of conditional branches a lot, Conditional Branch+ plugin is recommended

I just used the variable to get the stat as a parallel process in a common event so I can use it as many times as I want...

Thanks guys =)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,837
Reaction score
7,897
First Language
German
Primarily Uses
RMMV
I just used the variable to get the stat as a parallel process in a common event so I can use it as many times as I want...
bad idea, because that adds to lag without any real need.
just add a control variable command before every conditional branch that checks the value
 

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
90
Reaction score
26
First Language
Portuguese
Primarily Uses
RMVXA
bad idea, because that adds to lag without any real need.
just add a control variable command before every conditional branch that checks the value

It's not lagging at all...and I have 3 of those...one for atk, magatk and agility...the game is running normally
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,837
Reaction score
7,897
First Language
German
Primarily Uses
RMMV
It's not lagging at all..
lag is additive - and every computer has some processing reserves.
but each parallel process uses some of that processing, and it adds up the more you use (as well as other problems caused by too many parallel processes.

and it is a bad idea to use up the processing reserve for things that can be done other ways.

looking for lag only when it becomes detectable is like says "only the last beer was bad, the twelve beers before that have nothing to do with how I feel now"
 

Binder28

Veteran
Veteran
Joined
Sep 15, 2020
Messages
90
Reaction score
26
First Language
Portuguese
Primarily Uses
RMVXA
lag is additive - and every computer has some processing reserves.
but each parallel process uses some of that processing, and it adds up the more you use (as well as other problems caused by too many parallel processes.

and it is a bad idea to use up the processing reserve for things that can be done other ways.

looking for lag only when it becomes detectable is like says "only the last beer was bad, the twelve beers before that have nothing to do with how I feel now"

ok .-.
 

Sheklon

Veteran
Veteran
Joined
Jan 28, 2020
Messages
59
Reaction score
22
First Language
Portuguese
Primarily Uses
RMVXA
You can build a common event to check the stats of an actor and just recall that common event anytime you need to get it (before making the conditional branch). Its spares you from doing it manually every time.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,846
Reaction score
14,039
First Language
English
Primarily Uses
RMMV
A better way would be to just do a Control Variables prior to the Battle Processing call. A parallel process event is very inefficient for this.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.



Next time, please report your post and say it's been resolved, rather than adding a comment in an already-existing post - mods don't look at every post so might miss it, especially when it's an edit of an existing post, as that won't even make it bump to the top of the list.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

>Testing with fonts change.
>Tries installing a plugin. Doesn't work.
>Tries changing the plugin commands. Doesn't work.
>Tries installing another plugin. Doesn't work.
>Changes a few more plugin commands. Doesn't work.
>Goes directly to the gamefont file and changes the src. Works.

YYEEEAAAAHHHAAAA

Perseverance is key, bois and girls.
What Reviews say on RPG Maker MZ?
Looking back at some sketches, and game design documents on my PC dated summer of 2015. I started development with the release of MZ, but in 2015, I felt a strong desire to make a game out of the blue. I remember feeling sad for no apparent reason, and all these ideas rushed into my head. Now that I think about it, since that day, everything has become easier to do on my PC . . . it’s very creepy.
Everything's going to be alright! We're all in this together. <3
Aaaaannd published my game's tech demo. :D

Feel free to download and play it. And give feedback!

Forum statistics

Threads
107,806
Messages
1,032,340
Members
139,950
Latest member
Delv1s
Top