spawning random buttons
I'm trying to spawn a sequence of 20 buttons in a uniformed pattern, however each button has a numerical attribute between 1 and 25 (generated randomly) and then stores the attribute in a global variable.
Essentially, it's a 5X4 grid with random numbers.
My problem is that whenever I try and do a randomization between each spawn, I get a second (extra) button behind each of the original ones, overlapping. I isolated the problem to the randomization and I don't know why it happens (just a change attribute with the random function)
Anyone have an idea of how to implement this? or fix the problem? I don't mind re-writing code, I just want this to work
Essentially, it's a 5X4 grid with random numbers.
My problem is that whenever I try and do a randomization between each spawn, I get a second (extra) button behind each of the original ones, overlapping. I isolated the problem to the randomization and I don't know why it happens (just a change attribute with the random function)
Anyone have an idea of how to implement this? or fix the problem? I don't mind re-writing code, I just want this to work
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's what I decided to do.
I have 25 weapons, each corresponding to a value (1-25) So I'm creating a single actor with 20 instances each generating a random number and changing the weapon based on the generated number. Each number stored into 1 of 20 attributes (since there are no read/write tables) to which I can use to write the AI for the CPU player
Kingdom Hearts is built by the company who created Final Fantasy with licensing from Disney.