| 01-23-2004, 04:23 AM | #1 |
I Am Making A Magic Show Map And I Want The Magician To Hide Behind One Out Of 3 Rocks, I Want The Place To Be Random (So I Have 3 Regions And Want Him To Go To A Random One) & I Want To Person Watching It To Press 1, 2 Or 3 Corresponding To The Rock His Behind, Is That Possable? BTW, If I Cant Do The Random Thing Is It Possible To Make The 1, 2 Or 3 Thing, I Cant Find The Trigger :nono: Im A Newbie Who Knows Vb lol...:( THANK YOU IF YOU KNOW HOW |
| 01-23-2004, 11:47 AM | #2 |
I dont know if you can even do this but you could make a variable and set it to a random number 1-3. Then set it to the certain rocks depending on what number you get. (if that makes any sense lol) |
| 01-23-2004, 12:18 PM | #3 | |
Quote:
Please Don't Type Like This Ever Again. Thank You. And yes, this is trivially easy to do - I'm a little surprised you need help on it. All of these are Actions: Set variable = random number between 1-3 Wait .02 seconds If variable = 1 Then Unit - Move (instantly) Magician to Region 1 If variable = 2 Then Unit - Move (instantly) Magician to Region 2 If variable = 3 Then Unit - Move (instantly) Magician to Region 3 Random number is under the organizer of Math, btw - scroll up and down the list and you'll find it right off. The wait is pretty important - if you don't allow at least a brief pause, the game won't have time to generate a random number and check it by the time the If/Thens come up. You won't notice the .2 pause anyway, but if you don't do it, you'll always get the same result. |
| 01-23-2004, 05:22 PM | #4 |
This is how i'd do it: Make a region-array of size 3, and these triggers: Code:
Declare regions
Events
Map initialization
Conditions
Actions
Set Regions[1] = [color=red]Region 001 <gen>[/color]
Set Regions[2] = [color=red]Region 002 <gen>[/color]
Set Regions[3] = [color=red]Region 003 <gen>[/color]Code:
Magician moves behind rock
Events
Conditions
Actions
Unit - Order ([color=red]Unit_Magician[/color]) to Move To (Center of Regions[(Random integer number between 1 and 3)])Code:
Player Types String
Events
Player - [color=red]Player 1[/color] types a chat message containing <Empty String> as A substring
Conditions
Actions
If ((Entered chat string) Equal to 1) then do ([color=red]something[/color]) else do ([color=red]something[/color])
If ((Entered chat string) Equal to 2) then do ([color=red]something[/color]) else do ([color=red]something[/color])
If ((Entered chat string) Equal to 3) then do ([color=red]something[/color]) else do ([color=red]something[/color]) |
| 01-23-2004, 10:31 PM | #5 |
I Needed Help Cause I Never Had To Do Random Things And Never Red The Array Tut, lol. BTW What Don't You Want Me To Do, The Caps On Every Word Or The Huge...Red....LETTERS! lol |
