-
variable advice needed
You'd think i'd know this by now... anyway, i'm making a game whose game variables change depending on the round (let's say during round 2, var timer2 = 100, during round 3, var timer3 = 140) i have numerous variables that will change like this.
So ok, i have an MC that at the beginning of the round finds out what round we're in (let's say var theRound = 3; for the example) I want to set the generic variable "timeRemaining" to the value of "timer3" using "theRound"
so how do i do this? I'm imagining something like:
timeRemaining = "timer" + (theRound)
am i close? thanks.... ku (C8;
-
Senior Member
Assuming all these variables are attached to the _root timeline, you can do this:
timeRemaining = _root["timer" + theRound];
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|