mrbear
RPG Making Novice
Dont underestimate the bear's fury, just because he's adorable.
Posts: 102
|
Post by mrbear on Jun 22, 2005 14:25:45 GMT -5
I want to make a script that randomly calls one of 10 other scripts I know there must be a simple way to do this, but the only solutions i can come up with are mind numbingly complex variable operations (i add an odd number to a var. script condition which makes sure the var. hasnt gotten higher then 10 if it has then i subtract another var. which i continually cycle elsewhere in the script ) there has to be a better way!
|
|
mrbear
RPG Making Novice
Dont underestimate the bear's fury, just because he's adorable.
Posts: 102
|
Post by mrbear on Jun 22, 2005 14:27:55 GMT -5
btw the script excerpts i posted above arnt exact. it is actually infinatly more complicated & dosnt work very well EDIT oh yeah! I forgot to point out that these scripts are CONTENT type, if that makes any differance
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 22, 2005 15:28:20 GMT -5
Data: Variable: tempvariablex = 1 ? 10
this will randomize a variable from 1 to 10.
Script Branch: Sort: tempvariablex Apply If 1 (what you want to happen) To End Apply If 2 (what you want to happen) To End Apply If 3 (what you want to happen) To End Apply If 4 (what you want to happen) To End Apply If 5 (what you want to happen) To End Apply If 6 (what you want to happen) To End Apply If 7 (what you want to happen) To End Apply If 8 (what you want to happen) To End Apply If 9 (what you want to happen) To End Apply If 10 (what you want to happen) To End Script Branch: End
this will sort it and do what you want with different values for it.
|
|
|
Post by Rodak on Jun 22, 2005 15:32:06 GMT -5
This one's easy. Try something like this:
Data: Variable [which to choose?] = 0 ? 9 Sort: Variable: [which to choose?] Apply if # = 0 Call Script [first] Script Branch: To End Apply if # = 1 Call Script [second] Script Branch: To End
...
Apply if # = 9 Call Script [tenth] Script Branch: To End
That's all you need. Except filling in the third through eighth script calls, I'm sure you can figure those ones out.
If that is not what you meant, scream.
Good Luck.
Peace.
++++++++++++ EDIT: ++++++++++++
I had a feeling someone was going to beat me to this one. These type boards probably dont have a "Someone is replying, so wait if you care" alert, so I wont suggest it.
At least it did not happen to The Smurf again!
|
|
mrbear
RPG Making Novice
Dont underestimate the bear's fury, just because he's adorable.
Posts: 102
|
Post by mrbear on Jun 29, 2005 13:25:00 GMT -5
D'OH so it was just a regular idiot mistake. I'd forgotten about the "?" in the "math" operations for varibles!(hell, I dont even think I ever knew what it did!) anyway Y'all've solved my problem.(and the scripting suggestions are a welcome addition(I'll take all the help I can get)) thanx all
|
|
|
Post by Rodak on Jun 29, 2005 14:01:58 GMT -5
I dont even think I ever knew what it did! Any time you dont know what something does, highlight it and press "Start" for a help file. There's a great help file if you press start in an empty scripting field (or do so "between lines" of a script). Peace.
|
|