Staredit Network

Staredit Network -> UMS Assistance -> Random?
Report, edit, etc...Posted by Who-the-hell-ru on 2005-10-21 at 19:24:04
One simple yes or no question.

Is there a way, in which a script is randomly selected from a list, instead of having random for the switches?

If that doesnt explain it much...

Heres an example:

Say I want it to display texts at random.

"1"
"2"
"3"
"4"

Etc.

Is there a script that selects 1, 2, 3, 4 randomly, and picking just one to be activated, instead of :

Trigger
Players:
¤ All Players
Conditions:
¤ Switch one is set
Actions:
¤ Display test "1"


And

Trigger
Players:
¤ All Players
Conditions:
¤ Always
Actions:
¤ Set switch one, random



Does this make sense? confused.gif
Report, edit, etc...Posted by Ninebreaker on 2005-10-21 at 19:35:45
First of all, no it doesnt make sense to me. But i'm sure its possible to randomize when text comes...
Report, edit, etc...Posted by Mp)MinigameEast on 2005-10-21 at 19:36:19
you did it wrong.

its suppose to be


you have to make a trigger to set switch one.
then make this trigger.

switch 1 is set:

switch 2 to random:
switch 3 to random:
switch 4 to random:
switch 5 to random:
preserve trigger:

then you have to do these switches for 2-5

switch 2 is set:

display text:
clear switch 2:
preserve trigger:

do the same thing with 3, 4, and 5
Report, edit, etc...Posted by Who-the-hell-ru on 2005-10-21 at 19:57:48
Okay then. Thanks minigame. I suppose a better explaination is -if you had played "the thing", and how to do what "the thing" does. Or something like that.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-10-21 at 20:04:15
Uh No minigame...

So he wants to display one of 4 differant text options.

Conditions:
-Whatever you want to for you text to appear.
Actions:
-Set Switch 1
-Randomize Switch 2
-Randomize Switch 3

Then you would make a trigger for each random possabilitiy
( clear,clear | clear,set | set,clear | set,set )

Conditions:
-Switch 1 is set (same for each trigger)
-Switch 2 is clear
-Switch 3 is clear
Actions:
-Display text "1"

Conditions:
-Switch 1 is set
-Switch 2 is clear
-Switch 3 is set
Actions:
-Display text "2"

Conditions:
-Switch 1 is set
-Switch 2 is set
-Switch 3 is clear
Actions:
-Display text "3"

Conditions:
-Switch 1 is set
-Switch 2 is set
-Switch 3 is set
Actions:
-Display text "4"

Report, edit, etc...Posted by Mp)MinigameEast on 2005-10-21 at 20:13:46
mine was a little diffrent. i did mine with my map, but it has to be with another trigger
Report, edit, etc...Posted by PCFredZ on 2005-10-21 at 20:15:44
QUOTE(Mp)MinigameEast @ Oct 21 2005, 08:13 PM)
mine was a little diffrent. i did mine with my map, but it has to be with another trigger
[right][snapback]338642[/snapback][/right]

Yeah, in that it was more redudant.

Bolt's method, the binary system most people have been told to use, is much more efficient because it uses less switches and achieves the same result.
Report, edit, etc...Posted by Subrosian on 2005-10-21 at 20:58:18
actually Minigame's triggers achieve worse results because either more than one or none of the switches can be triggered.

Changed incorrect use of pronoun, thanks to PCFredZ
Report, edit, etc...Posted by PCFredZ on 2005-10-21 at 21:03:51
QUOTE(Subrosian @ Oct 21 2005, 08:58 PM)
actually it achieves worse results because either more than one or none of the switches can be triggered.
[right][snapback]338682[/snapback][/right]

You should clarify your statement by saying "Mini's method" instead of "it".
Report, edit, etc...Posted by Oo.Turin.oO on 2005-10-21 at 22:33:28
To answer the actual question. No you can't have random text without switches. So, you will want to follow (U)-Bolt's method if you still want random text.
Report, edit, etc...Posted by Urmom(U) on 2005-10-21 at 22:38:48
What about the junkyard method? And if anybody is wondering why Bolt has that extra switch, its so that the trigger won't run for the cleared switches. Then you would get randomized text at the beginning of the game because switchs start out cleared.
Report, edit, etc...Posted by PCFredZ on 2005-10-21 at 22:47:36
QUOTE(urmom @ Oct 21 2005, 10:38 PM)
What about the junkyard method?
[right][snapback]338759[/snapback][/right]

It'd take up space, and will not work if you want instaneous randomizations since units move a lot slower than it takes for switches to be set or cleared.
Report, edit, etc...Posted by DT_Battlekruser on 2005-10-22 at 01:12:37
The answer is no, you cannot create a trigger that says: pick from a,b,c, or d and display. You must use switch randomization or other worse methods (such as junkyard dog).

Topic Locked to prevent imminent spam.
Next Page (1)