Picking between arrays via options

Cr1t1cal

Veteran
Veteran
Joined
Nov 24, 2016
Messages
40
Reaction score
18
First Language
English
Primarily Uses
Hey so i No idea in how to make a option pick between two arrays and then my other option to use that array or how to even ask how to do it, Google keeps pointimg me to pick random element out of 2 arrays. 


So say I have my array1 and array2 


How would I get an option to if on use array1 if off uses array2.


Sorry if yea can't make sense out of what I mean but I had no idea how to ask/word it 


Any help would be greatly appreciated Thanks 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
Please give more details on what you want to do (and not only how you want to do it), then we can point you to a way on how to do that.


Because basically arrays are independent of each other and you'll need some external control if you want to switch between two arrays.
 

Cr1t1cal

Veteran
Veteran
Joined
Nov 24, 2016
Messages
40
Reaction score
18
First Language
English
Primarily Uses
Hey Andar thanks on reply.


OK so I kinda got it to change the array In options.


So my first array is normRes and second is wideRes.


My first option is widescreen and second is resolutions 


 So I kinda got it to work by adding;


_changeValue.call (this, symbol, value);


If (symbol == "widescreen") {


    If (value) 


         this.aspectType = this.wideRes;


    else


         this.aspectType = this.normRes;


}


I created a empty third array aspectType but know I can't change resolution useless I turn widescreen and shows all wide resolutions and if I turn widescreen off it shows normal resolutions 


Still having a problem to load my widescreen value in options, 


Hey Andar thanks on reply.


OK so I kinda got it to change the array In options.


So my first array is normRes and second is wideRes.


My first option is widescreen and second is resolutions 


 So I kinda got it to work by adding;


_changeValue.call (this, symbol, value);


If (symbol == "widescreen") {


    If (value) 


         this.aspectType = this.wideRes;


    else


         this.aspectType = this.normRes;


}


Update: so just edited the ChangeValue and put them in there own function so I could use


ConfigManager.widescreen = true;


ConfigManager.save ();


So I created a empty third array aspectType to pass other 2 arrays but now I can't change resolution useless I turn widescreen on/off 


But I must turn widescreen option on/off first for my resolutions to work?


If I don't turn widescreen on/off I can't change my resolution. I can provide a pastebin to look at full code as I've lost my self a lil now :/
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top