Script to compaire multiple variables

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you don't need the vars= anymore...
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
it should be

Code:
$game_variables[20] = highest_var(*vars)
 

ncognito

Veteran
Veteran
Joined
Jul 7, 2013
Messages
157
Reaction score
4
First Language
English
Primarily Uses
oh ok. now it fits in the control variables script box so should i link it to the Highest variable like this?

@>control variables: [0020:Highest Nature] = $game_variables[20] = highest_var(1..16)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You double assigned it...

remove the $game_variables[20] = part...

that is only used if you're doing a full script call for setting a variable (meaning assigning value to a variable using the script command at the third page of the command events)...

it's not needed if ur using the change variable event command...

so it would only be

@>control variables: [0020:Highest Nature] = highest_var(1..16)
 

ncognito

Veteran
Veteran
Joined
Jul 7, 2013
Messages
157
Reaction score
4
First Language
English
Primarily Uses
ahh my bad, now i inserted a text section after the variable that just said "your nature is \v[20]" It listed points for all 16 variables instead of just the highest. what im tryin to do is if the player got more points on variable bold then it say "your nature is bold" and give the player the character graphic for bold.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
w8, so you want the variable name??? that might be trickier

anyway, I can't comment for why it shows all of the 16 variables as I'm not versed with the method that theodoric used...
 

ncognito

Veteran
Veteran
Joined
Jul 7, 2013
Messages
157
Reaction score
4
First Language
English
Primarily Uses
yeah. well thx to the both of ya for helpin me get this far.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
@adi: if you push an array it will add that array instead the array element.

If you want to merge two array you can use + (plus sign):

array = [1,2,3,4,5,6,7,8,9,10]

array = array + [11,12,13,14]

There's also another method using << I think.

@ncognito: after you store the result to variable. Then you do conditional branch. If that var = 1. Nature=timid.

Sorta like that.

Edit: my phone acting strange and didn't show newer post...
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
so it will be like:

array = [0,1,2,3,4]

array.push(5,6,7,8,9)

array becomes 0,1,2,3,4,[5,6,7,8,9]?

about his question, It was weird that it shows all variables since the method theo posted should have returned only 1 variable if it works correctly, so \V[20] should only show 1 variable instead of the whole 16 variables
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top