Easier way?

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Please look at picture attached.

How it currently works is every time a skill levels up, it fires the previous level rank as well. So if you level to rank 3 you will get the message for leveling rank 1, 2, and 3. 

How can I get this to work in one event vs having to have one for each spell rank? 

1.png
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
If you don't want all of the messages to pop up, you should nest the conditional branches into each other.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,359
Reaction score
7,672
First Language
German
Primarily Uses
RMMV
reverse the order (highest rank upgrades first) and exit event processing after the first successfull upgrade to prevent the other, lower upgrades.
 

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
reverse the order (highest rank upgrades first) and exit event processing after the first successfull upgrade to prevent the other, lower upgrades.
Do I keep them in <= or should it be >=?

@Iavra

I don't know how to nest these together in this editor.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
You should go for Andar's solution, since it performs better and is easier to look at than mine.

You keep all conditions as they are, but reverse their order (so the highest one is checked first) and exit event processing at the end of every case.
 

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Is there a way to store a string into a variable and have it post in a message box?

So for instance, the message:

Fire I has been upgraded to Fire II!

Store the word "Fire" into a variable, then change the message to say:

variable I has been upgrade to variable II!

This way I can just change the variable one time per spell type. Just saves a lot of typing. Can this be done with this editor? 
 
Last edited by a moderator:

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Variables only store numbers. But you can use them to access Strings defined in RGSS. So for example:

module TEST    TEXT = [        "abc",        "def",        "ghi"    ]end TEST::TEXT[$game_variables[1]]would give you the nth value of TEST::TEXT, where n is defined in variable #1.

Note that the first element has the index 0, not 1.
 
Last edited by a moderator:

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
To input a string in the default "Control Variables" command, you just need to type

"string"into the script operand (where the word string is the text you want). Then you just call the variable as usual.
 
Last edited by a moderator:

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
Variables only store numbers. But you can use them to access Strings defined in RGSS. So for example:

module TEST    TEXT = [        "abc",        "def",        "ghi"    ]end TEST::TEXT[$game_variables[1]]would give you the nth value of TEST::TEXT, where n is defined in variable #1.

Note that the first element has the index 0, not 1.
Ok so create a custom script and essentially create an array that stores all the strings. How do you call that variable using the default message editor?

 

To input a string in the default "Control Variables" command, you just need to type

"string"into the script operand (where the word string is the text you want). Then you just call the variable as usual.
I don't understand what you're saying here.

1.png
 
Last edited by a moderator:

Kvich

Veteran
Veteran
Joined
Oct 6, 2014
Messages
89
Reaction score
19
First Language
Danish
Primarily Uses
You should be able to make a scrip call like:

$game_variables[1] = "Fire"

And whenever you write \v[1] in a dialog, it will say Fire.
 

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
^Kvich's method is a different approach to what I said, but both work the same. This is what I meant:





 
Last edited by a moderator:

Zero0018

Apprentice
Member
Joined
Dec 24, 2014
Messages
133
Reaction score
1
First Language
English
Primarily Uses
@Hollow:

Nice. This works. Thanks for clarifying. Picture attached is final setup

1.png
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top