Staredit Network

Staredit Network -> UMS Assistance -> Randomizing?
Report, edit, etc...Posted by FTR_ROCKO on 2004-07-17 at 23:55:46
helpsmilie.gif
i was just wondering how can i randomize text appearance? So, whenever i bring a unit to a location the message it displays will be different almost everytime, depending on how many messages i have for it to show. The message will only display once, and it wont change even if the unit comes back to that location, unless the mission is restarted.
Report, edit, etc...Posted by (U)Bolt_Head on 2004-07-18 at 00:50:33
I really need to write a tutorial on randomizing. Sorry i don't have time to write out a full trigger list with reasoning now.
Report, edit, etc...Posted by Thermo on 2004-07-18 at 02:07:24
Well the simplest way i would know how to do this is something like the following.

Trigger 1( the trigger that sets off the messages )

Condtion

Player x brings at least one any unit to location 0

Action

Set deaths for current player to 1 for (some unused unit)
Randomize switch 0
Randomize switch 1
Randomize switch 2
Randomize switch 3
Randomize switch 4
Randomize switch 5
Randomize switch 6
Randomize switch 7
Move all units belonging to current player from location 0 to location 1
Preserve trigger

Trigger 2 (This is the display trigger it displays one messages. Btw this is just 1 message of a possible 256 messages)

Condition

Current Player has at least 1 deaths of (the same unused unit)
Switch 0 is clear
Switch 1 is clear
Switch 2 is clear
Switch 3 is clear
Switch 4 is clear
Switch 5 is clear
Switch 6 is clear
Switch 7 is clear

Action

Display text for current player" ( put your text here )"
Set deaths for current player to 0 for ( the same unused unit)
Preserve trigger.

Now for this example there is 256 each switch you add adds 2^n where n is the number of switches. So for this example there are 8 switches so there is 2^8 possibilities or 256.

Now remeber that this is just 1 example you have anouther 255 messages to go and the possibilites are quite long like you have one set clear clear set set set set set
then another one is clear set clear set set set set set and so on going on and on which will take awhile a very long time and eat up 256 strings total ( unless you have
unused possibilities which instead of producing a message will produce nothing when a player walks up to whatever )

Btw if you want to have multiply message set off thingys just use a different location for the bring and the move.
Report, edit, etc...Posted by Valahan on 2004-07-18 at 03:49:40
When making randomized triggers, I find it best to start off with the biggest number and go down to the smallest number.

Lets say you are using 4 triggers. 2^4 = 16. So you have 16 possible outcomes.

In this case, I will use binary to represent the switches state.
1=set, 0=clear.

I usually start off with all Set, and slowly make my way down towards all clear.

Here we go:

1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000

There's what you can use to easily figure out which triggers you have or havent done yet. Simply 'strike-out' the number or put a check mark beside it.

I'm so bored that I have already started doing 2^100... that means there are 1,267,650,600,228,229,401,496,703,205,376 possibilities. And remember, Starcraft has 256... so can you imagine? tongue.gif I have no idea how that number is 'said', so lets say ... a little over '1 million trillion trillion'? LOL... i'm such a nerd.
Report, edit, etc...Posted by Elven_Fury on 2004-07-18 at 04:01:36
Hear is a map with random triggers i made for you
does every thing you want, if you want more posibilitys just add more triggers into the randomization trigger note switch 3 is what makes it say the same thing second time you go to the becon
Report, edit, etc...Posted by DT_Battlekruser on 2004-07-18 at 11:14:20
QUOTE
'1 million trillion trillion'


Lol what on earth is the point of making a random switch so big? The numbers of sc units and sprites is only about 150 and theres a string limit well under '1 million trillion'
Report, edit, etc...Posted by FTR_ROCKO on 2004-07-18 at 14:20:49
biggrin.gif that test map was exactly what i needed. it's exactly what i was trying to do. thanks a billion dude.

w00t.gif w00t.gif now i can finished my map, phew....
Report, edit, etc...Posted by MindArchon on 2004-07-18 at 14:48:29
Solution Solved, Locky Locky
Next Page (1)