Staredit Network

Staredit Network -> UMS Assistance -> Random Player
Report, edit, etc...Posted by JaFF on 2006-05-22 at 04:49:13
I need to select 1 player out of 6 possible. Not all players may be in game.

No, ramdom start location won't work. No, mooving through a field of junk yard dog units won't help allso. I need to do it with switches and 1 preplaced unit (to tell is the player in game)
Note: the unit "Fate" is placed by default to determine is the player in game

I'm doing this:

Main randomize Trigger
Conditions: switch "randomize" is cleared
Actions: randomize "switch1"
randomize "switch2"
randomize "switch3"
set "randomize"
preserve trigger

Player 1 not in game
Conditions: the combination of those 3 switches
player 1 commands exactly 0 Fate
Actions: clear "randomize"
preserve trigger

Player 1 selected
Conditions: the combination of those 3 switches
player 1 commands atleast 1 Fate
Actions: set "player 1 selected"

Player 2 not in game
Conditions: the combination of those 3 switches
player 2 commands exactly 0 Fate
Actions: clear "randomize"
preserve trigger

Player 2 selected
Conditions: the combination of those 3 switches
player 2 commands atleast 1 Fate
Actions: set "player 2 selected"

And so on for all 6 players + the 2 triggers that remoove the 2 unneeded/unused combinations.

When I'm testing it in single player, it randomizes those switches 1-7 (usually) times & then stops.

Can someone tell me what can be wrong ? Thanks smile.gif
Report, edit, etc...Posted by in_a_biskit on 2006-05-22 at 09:56:23
It doesn't seem like anything's wrong with that - It'll randomize and keep finding players that aren't there, so "randomize" will be cleared and it'll re-randomize... until it finds you, who are the only player in the game, at which point it'll set "player 1 selected" or whatever and then stop randomizing, since that trigger doesn't reset the switch "randomize".
Report, edit, etc...Posted by l3liZzArD-X on 2006-05-22 at 12:11:51
lol why not just simplify things and say First Player Required? or is it random charactor start location ?
Report, edit, etc...Posted by JaFF on 2006-05-22 at 13:02:11
QUOTE(l3liZzArD-X @ May 22 2006, 07:11 PM)
lol why not just simplify things and say First Player Required? or is it random charactor start location ?
[right][snapback]490824[/snapback][/right]


It's random start location.

ADDITION:
QUOTE(in_a_biskit @ May 22 2006, 04:56 PM)
It doesn't seem like anything's wrong with that - It'll randomize and keep finding players that aren't there, so "randomize" will be cleared and it'll re-randomize... until it finds you, who are the only player in the game, at which point it'll set "player 1 selected" or whatever and then stop randomizing, since that trigger doesn't reset the switch "randomize".
[right][snapback]490795[/snapback][/right]


If it was that good as you stated, I wouldn't post it here wink.gif
Report, edit, etc...Posted by fritfrat(U) on 2006-05-22 at 15:20:07
Your triggers look good, you just made an error somewhere.

If it stops, it means that at one point it did not re-clear the "randomize" switch. Try double checking these points, as these would most likely be the most common source:

-Make sure the 2 other unsused combinations re-clear the "randomize" switch if they get selected.

-Check your "selection" triggers to make sure that the conditions for players 2-6 selection cannot be fufilled if they are not there, and that if it is not fufilled, "randomize" is cleared.

-Make sure every single one has a preserve trigger.
Report, edit, etc...Posted by JaFF on 2006-05-22 at 15:41:11
Yes, I found the mistake - I made the conditions wrong, didn't need one pinch.gif

Thanks for the help smile.gif
Next Page (1)