- Joined
- Jul 9, 2021
- Messages
- 45
- Reaction score
- 7
- First Language
- English
- Primarily Uses
- RMMV
okay so... this is a little complex so i haven't been able to figure it out on my own. but basically i want a script that creates a random party based on who you've unlocked. it would go something like this
when you unlock a party member, it changes a variable assigned to them. so, say you unlock harold, a variable (with the ID of 1) named harold would now be equal to 1. assume the same can be said for therese, marsha and lucius (IDs 2, 3 and 4 respectively). variable ID 5 is Reid, who you haven't unlocked, so his variable is set to 0.
So, a random variable is generated from 1 to 5. when that number is generated, i want it to check if the variable with the ID equal to the number generated is equal to 0 or 1. if it's 0, generate another number. if it's 1, then do it again for the next party slot.
(obviously the numbers and party members used here are just an example)
what i'm asking for is if anyone would be able to put this into javascript that would be awesome, since i don't think you can do this kind of thing with the event options in MV.
hopefully that all makes sense. i can explain better if i need to.
when you unlock a party member, it changes a variable assigned to them. so, say you unlock harold, a variable (with the ID of 1) named harold would now be equal to 1. assume the same can be said for therese, marsha and lucius (IDs 2, 3 and 4 respectively). variable ID 5 is Reid, who you haven't unlocked, so his variable is set to 0.
So, a random variable is generated from 1 to 5. when that number is generated, i want it to check if the variable with the ID equal to the number generated is equal to 0 or 1. if it's 0, generate another number. if it's 1, then do it again for the next party slot.
(obviously the numbers and party members used here are just an example)
what i'm asking for is if anyone would be able to put this into javascript that would be awesome, since i don't think you can do this kind of thing with the event options in MV.
hopefully that all makes sense. i can explain better if i need to.