Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Random Murderer/Alien/Evil Guy
Random Murderer/Alien/Evil Guy
Aug 25 2008, 11:32 pm
By: XShooterX  

Aug 27 2008, 2:25 pm XShooterX Post #21



Can i make it at start of the game it randomizes the switches and w/e they are set too it picks the right player? or would it fail?



None.

Aug 27 2008, 3:53 pm rockz Post #22

ᴄʜᴇᴇsᴇ ɪᴛ!

You could use Nude's method, then have everyone start in the same location, with the murderer somewhere else.

It's probably just easier to do a randomized death counter with random start locations.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Aug 27 2008, 7:07 pm Falkoner Post #23



If you randomize the switches there is the chance they could pick a non-existant player, you could rerandomize until you get a valid player though.



None.

Aug 27 2008, 7:38 pm Viett Post #24



It's not really urgent that the triggers finish in one run. With 3 players, in one game second, there is a 99.7% chance that a player will be chosen. Also, you can hold the progression of triggers with conditions until someone is chosen. You can see this concept in the Christmas Map I made, which randomizes gifts depending on how many players there are. It randomizes up to 8 gifts in less than a second almost every time.

http://www.staredit.net/files/714/



None.

Aug 27 2008, 9:20 pm XShooterX Post #25



Quote from Falkoner
If you randomize the switches there is the chance they could pick a non-existant player, you could rerandomize until you get a valid player though.
how is this possible?



None.

Aug 27 2008, 11:15 pm Viett Post #26



Here is a snippet from Phantom BGH Classic. Be careful you don't Randomize, then check for P1, randomize again, check for P2, etc. This will cause the first few players to have a greater chance than the others.

Code
//> Choose Phantom
// 3 Switches for 8 combinations. Khalis Crystal ensures one randomization per trigger cycle.
Trigger("All players"){
Conditions:
    Elapsed Time(At least, 77);
    Deaths("All players", "Goliath Turret", Exactly, 0);
    Switch("Switch6", not set);
    Deaths("All players", "Khalis Crystal", Exactly, 0);

Actions:
    Set Switch("Switch1", randomize);
    Set Switch("Switch2", randomize);
    Set Switch("Switch3", randomize);
    Set Deaths("All players", "Khalis Crystal", Set To, 1);
    Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
    Switch("Switch1", not set);
    Switch("Switch2", not set);
    Switch("Switch3", not set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 2"){
Conditions:
    Switch("Switch1", set);
    Switch("Switch2", not set);
    Switch("Switch3", not set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 3"){
Conditions:
    Switch("Switch1", not set);
    Switch("Switch2", set);
    Switch("Switch3", not set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 4"){
Conditions:
    Switch("Switch1", set);
    Switch("Switch2", set);
    Switch("Switch3", not set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 5"){
Conditions:
    Switch("Switch1", not set);
    Switch("Switch2", not set);
    Switch("Switch3", set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 6"){
Conditions:
    Switch("Switch1", set);
    Switch("Switch2", not set);
    Switch("Switch3", set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
    Switch("Switch1", not set);
    Switch("Switch2", set);
    Switch("Switch3", set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("Player 8"){
Conditions:
    Switch("Switch1", set);
    Switch("Switch2", set);
    Switch("Switch3", set);
    Elapsed Time(At least, 77);

Actions:
    Set Deaths("Current Player", "Goliath Turret", Set To, 1);
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
    Deaths("Current Player", "Khalis Crystal", Exactly, 1);

Actions:
    Set Deaths("Current Player", "Khalis Crystal", Set To, 0);
    Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
    Deaths("All players", "Goliath Turret", Exactly, 1);
    Deaths("Current Player", "Goliath Turret", Exactly, 0);

Actions:
    Display Text Message(Always Display, "The Phantom has been chosen. Gather your wits and prepare for battle!");
    Play WAV("sound\\Zerg\\LURKER\\ZLuPss03.WAV", 0);
    Set Deaths("All players", "Nuclear Missile", Add, 1);
    Set Switch("Switch6", set);
}

//-----------------------------------------------------------------//

Trigger("All players"){
Conditions:
    Deaths("Current Player", "Goliath Turret", Exactly, 1);

Actions:
    Display Text Message(Always Display, "\x013\x006YOU ARE THE PHANTOM - KILL THEM ALL!");
    Play WAV("sound\\Zerg\\Hydra\\ZHyPss00.WAV", 0);
    Set Deaths("All players", "Nuclear Missile", Add, 1);
    Set Switch("Switch6", set);
}

//-----------------------------------------------------------------//
//<





Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:15 am]
DarkenedFantasies -- you eat lots of beans
[03:46 am]
IskatuMesk -- how do i get gas
[11:43 pm]
Moose -- you don't
[10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
[2026-4-13. : 9:14 pm]
ClansAreForGays -- anticapitalism isnt edgy anymore
Please log in to shout.


Members Online: NimoStar