Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] Randomization Help
Report, edit, etc...Posted by Shadow on 2006-02-05 at 12:42:50
Well, am making a heroes type map, and I do not know how to do this correctly.

There is a choice of 4 heroes, and a "Random Unit".

What I would like to do, is when they select the "Random Unit" you get 1 unit out the 4.
The problem I am having is, how many switches would I need to randomize? Because I don't think I am doing it right.

Here is what I was thinking about doing, but it doesn't make sense to me...


=======
Conditions
=======
P'X' brings '1' to "Hero - 1"
Deaths of "Y" = 1

=====
Actions
=====
Randomize Switch '1'
Randomize Switch '2'
Set Switch '3'
Set Deaths of "Y" = 0
Remove 'Unit' at "Hero - 1"

=======
Conditions
=======
Switch '1' = Set
Switch '2' = Clear
Switch '3' Set

=====
Actions
=====
Create "Hero - 1" at "B"
Clear Switch '3'
Preserve Trigger.




=======
Conditions
=======
P'X' brings '1' to "Hero - 2"
Deaths of "Y" = 1

=====
Actions
=====
Randomize Switch '1'
Randomize Switch '2'
Set Switch '3'
Set Deaths of "Y" = 0
Remove 'Unit' at "Hero - 2"

=======
Conditions
=======
Switch '1' = Clear
Switch '2' = Set
Switch '3' Set

=====
Actions
=====
Create "Hero - 2" at "B"
Clear Switch '3'
Preserve Trigger.



So, then what would I do for the other 2 heroes? This only covers 2 of them...
Report, edit, etc...Posted by Forsaken on 2006-02-05 at 13:03:48
Hmm... I think you forgot 2 other parts to the trigger. tongue.gif


The randomization. (Which you had correct)

Trigger
Description:
Random Hero
Players:
¤ P"X"
Conditions:
¤ P"X" Brings 1 Unit "Hero - 1"
¤ Deaths "Y" = 1
Actions:
¤ Randomize Switch 1
¤ Randomize Switch 2
¤ Set Switch 3
¤ Set Deaths "Y" to 0
¤ Preserve Trigger


To create "Hero - 1"

Trigger
Description:
Hero 1
Players:
¤ P"X"
Conditions:
¤ Switch 1 = Set
¤ Switch 2 = Set
¤ Switch 3 = Set
Actions:
¤ Clear Switch 3
¤ Create "Hero 1" at "B"
¤ Preserve Trigger


To create "Hero 2"

Trigger
Description:
Hero 2
Players:
¤ P"X"
Conditions:
¤ Switch 1 = Set
¤ Switch 2 = Clear
¤ Switch 3 = Set
Actions:
¤ Clear Switch 3
¤ Create "Hero 2" at "B"
¤ Preserve Trigger


To create "Hero 3"

Trigger
Description:
Hero 3
Players:
¤ P"X"
Conditions:
¤ Switch 1 = Clear
¤ Switch 2 = Set
¤ Switch 3 = Set
Actions:
¤ Clear Switch 3
¤ Create "Hero 3" at "B"
¤ Preserve Trigger


To create "Hero 4"

Trigger
Description:
Hero 4
Players:
¤ P"X"
Conditions:
¤ Switch 1 = Clear
¤ Switch 3 = Clear
Actions:
¤ Clear Switch 3
¤ Create "Hero 4" at "B"
¤ Preserve Trigger


What you did wrong, or forgot...

WHat you forgot, was that you had 4 outcomes:
SET
SET
;
SET
CLEAR
;
CLEAR
SET
;
CLEAR
CLEAR

Where each of those could be an outcome.

If you have anymore help, you can ask here, or PM me. smile.gif
Report, edit, etc...Posted by Kenoli on 2006-02-05 at 13:04:30
To randomize between four things, you'll need 2 switches.
First, you randomize the switches. They will be either cleared or set.
Then, you've got four possibilities. You need at lease one trigger for each possilibty. Like this:
Trigger
Conditions:
¤ Switch 1 is Cleared
¤ Switch 2 is Cleared
Actions:
¤ Action #1

Trigger
Conditions:
¤ Switch 1 is Set
¤ Switch 2 is Cleared
Actions:
¤ Action #2

Trigger
Conditions:
¤ Switch 1 is Cleared
¤ Switch 2 is Set
Actions:
¤ Action #3

Trigger
Conditions:
¤ Switch 1 is Set
¤ Switch 2 is Set
Actions:
¤ Action #4
Report, edit, etc...Posted by Shadow on 2006-02-05 at 13:10:03
Wow, that makes sense! :^_^:


Thank you for the help.
Next Page (1)