Staredit Network

Staredit Network -> UMS Assistance -> RANDOM LANDINGS
Report, edit, etc...Posted by Atreyu) on 2005-07-07 at 02:48:58
Ok well in my map you pick a unit and I have 6 different locations but, I don't want it to just land in 1 certain location I would like to land in a random location. Is it possible to do that?? If it is please tell me I would appreciate it.
Report, edit, etc...Posted by Sniper on 2005-07-07 at 02:51:46
Yea, it's possible using randomization triggers. I don't think it would work for switches because no powers of 2 will equal six. I've actually got a map with randomized landings right now going. IM me on b.net if you wanna see.
Report, edit, etc...Posted by Screwed on 2005-07-07 at 02:55:14
Just use rerandomising as the actions for two of the possible outcomes.
Report, edit, etc...Posted by Beardo on 2005-07-07 at 04:57:42
QUOTE(Screwed @ Jul 6 2005, 10:55 PM)
Just use rerandomising as the actions for two of the possible outcomes.
[right][snapback]255615[/snapback][/right]


What he said
Report, edit, etc...Posted by Atreyu) on 2005-07-07 at 05:33:23
I mean I get what you trying to say but, I need explanations on the conditions/actions. Mp)Sniper's map that he should me and told me I could look at it has an error and I can't open it. sad.gif Help me please helpsmilie.gif
Report, edit, etc...Posted by in_a_biskit on 2005-07-07 at 05:43:37
We have tutorials for everything!
http://www.staredit.net/index.php?tutorial=61 - Randomization
Report, edit, etc...Posted by pimpinelephant on 2005-07-07 at 06:18:21
yeah, tutorials, people never look in the tutorials first lol.
Report, edit, etc...Posted by Atreyu) on 2005-07-07 at 16:02:04
Yeah, but I looked at those before I posted and Its kind of not what Im trying to do its different randomization :\
Report, edit, etc...Posted by in_a_biskit on 2005-07-08 at 02:51:29
The tutorial explains this, but maybe not well enough:

If you want to have a randomisation into a number of outcomes which is not an exact power of 2, then randomise enough switches to get to a power of two which is greater than the number of outcomes that you want. Then take only enough combinations of the switch-states to assign one combination to each outcome that you want, leaving some combinations left over (since the total number of combinations will be some power of 2 which is greater than the number of outcomes you want). Each of these 'leftover' outcomes then becomes a 're-randomisation' outcome - that is, if you get a 'leftover' outcome, you randomise all the switches again, until you find a combination that corresponds to one of your 'real' outcomes.

It works the same way as if I wanted to generate a random number from 1 to 17, but using a 20-sided dice. I would roll the dice, but if I came up with an 18, 19 or 20, then I'd roll it again, until I got a number between 1 and 17.

The tutorials give a good way of setting up the triggers for this to happen.
Report, edit, etc...Posted by HeRtZ on 2005-07-08 at 03:22:42
use switches and just randomize them -.-
Report, edit, etc...Posted by ViLe(U) on 2005-07-08 at 06:47:35
Is this a comment or a question?
Next Page (1)