Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Randomization That Should Work but Doesn't :/
Randomization That Should Work but Doesn't :/
Sep 24 2017, 1:45 am
By: m.0.n.3.y  

Sep 24 2017, 1:45 am m.0.n.3.y Post #1



The basic theme is this:

I have 8 locations and protoss beacons owned by neutral player. I want to move a beacon to one of the 8 locations randomly every so often, BUT, only if that location is not already occupied by a beacon or any other units -- if this is the case, then I want to reroll the randomization process and start again so it can put it in an unoccupied location.

The randomization works, but for some reason, about 10% of the time, a beacon will be moved to a location that already has a beacon in it. Either that, or the beacon that already is there isn't getting deleted? I'm not sure which, can't tell.

Anyways, here are the triggers.


DEATH COUNTER TIMER TO MOVE HILL
Players

  • Player 7
  • Conditions

  • Always
  • Actions

  • Modify death counts for Current Player: Add 1 for Hill Move Counter
  • Preserve Trigger



  • MOVE HILL RANDOMIZER
    Players

  • Player 7
  • Conditions

  • Current Player has suffered at least 72 deaths of Hill Move Counter
  • Actions

  • Modify death counts for Current Player: Set to 0 for Hill Move Counter
  • Set Switch Hill Random Move Initiate
  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Preserve Trigger


  • MOVE BEACON BUT THERE'S SOMETHING IN THE WAY SO REROLL
    Players

  • Player 7
  • Conditions

  • All Players brings at least 1 [any unit] to Hill 1
  • Switch Hill Random Move Initiate is Set
  • Switch 1 is Set
  • Switch 2 is Set
  • Switch 3 is Set
  • Actions

  • Modify death counts for Current Player: Set to 0 for Hill Move Counter
  • Set Switch Hill Random Move Initiate
  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Preserve Trigger



  • MOVE BEACON TO HILL 1 BECAUSE RANDOMNESS HAPPENED AND THERE'S NOTHING THERE
    Players

  • Player 7
  • Conditions

  • All Players brings exactly 0 [any unit] to Hill 1
  • Switch Hill Random Move Initiate is Set
  • Switch 1 is Set
  • Switch 2 is Set
  • Switch 3 is Set
  • Actions

  • Clear Switch Hill Random Move Initiate
  • Remove All Protoss Beacon or All Players at "Field"
  • Move 1 Protoss Beacon for Neutral at "Beacons" to "Hill 1"
  • Preserve Trigger



  • So that's basically it. And then those last two triggers are repeated for locations 1-8 (hills 1-8). Any help guys? Thank you! :D






    SOLVED :D ... after about 6 hours lol :-(

    SO

    APPARENTLY

    Starcraft does not recognize Protoss Beacons (whether it's protoss beacons in general or just protoss beacons owned by neutral player) in the bring condition using "ALL PLAYERS". HOWEVER, it does recognize neutral owned protoss beacons if they are specified by player.

    EX:
    Condition:
    All players bring at least 1 protoss beacon to X
    ^if the beacon is owned by a neutral player then StarCraft wont recognize it.

    BUT
    Condition:
    Neutral player brings at least 1 protoss beacon to X
    ^StarCraft WILL recognize it.


    This is weird because you can use things like the Move action to recognize neutral owned protoss beacons.
    EX:
    Condition:
    Whatever

    Action:
    Move 1 protoss beacon owned by All Players at location X to location Y
    ^the beacon is owned by neutral and StarCraft will recognize it and move it.


    So for some weird reason the BRING CONDITION does not recognize neutral player protoss beacons, but other actions do.

    Basically what I had to do is create 5 triggers per random switch result.
    So for Switch 1 set, Switch 2 set, and Switch 3 set, I had to create 5 triggers, which are:
    1. Reroll if all players bring any unit to location X (used to detect if humans bring marines or whatever there)
    2. Reroll if neutral player brings at least 1 protoss beacon to location X
    3. Reroll if computer player 7 player brings at least 1 protoss beacon to location X
    4. Reroll if computer player 8 brings at least 1 protoss beacon to location X
    5. Move beacon because there is nothing in location X

    Very tedious, arduous and stupidly random lol. IDK why it works this way but I guess we all know SC is a strange bitch. Oh well, there's one new thing learned lol

    Post has been edited 2 time(s), last time on Sep 24 2017, 3:59 am by m.0.n.3.y.



    None.

    Sep 24 2017, 2:01 am m.0.n.3.y Post #2



    I play a wav file when the hill gets moved successfully so maybe that messes something up?



    None.

    Sep 24 2017, 3:53 am m.0.n.3.y Post #3



    SOLVED :D ... after about 6 hours lol :-(

    SO

    APPARENTLY

    Starcraft does not recognize Protoss Beacons (whether it's protoss beacons in general or just protoss beacons owned by neutral player) in the bring condition using "ALL PLAYERS". HOWEVER, it does recognize neutral owned protoss beacons if they are specified by player.

    EX:
    Condition:
    All players bring at least 1 protoss beacon to X
    ^if the beacon is owned by a neutral player then StarCraft wont recognize it.

    BUT
    Condition:
    Neutral player brings at least 1 protoss beacon to X
    ^StarCraft WILL recognize it.


    This is weird because you can use things like the Move action to recognize neutral owned protoss beacons.
    EX:
    Condition:
    Whatever

    Action:
    Move 1 protoss beacon owned by All Players at location X to location Y
    ^the beacon is owned by neutral and StarCraft will recognize it and move it.


    So for some weird reason the BRING CONDITION does not recognize neutral player protoss beacons, but other actions do.

    Basically what I had to do is create 5 triggers per random switch result.
    So for Switch 1 set, Switch 2 set, and Switch 3 set, I had to create 5 triggers, which are:
    1. Reroll if all players bring any unit to location X (used to detect if humans bring marines or whatever there)
    2. Reroll if neutral player brings at least 1 protoss beacon to location X
    3. Reroll if computer player 7 player brings at least 1 protoss beacon to location X
    4. Reroll if computer player 8 brings at least 1 protoss beacon to location X
    5. Move beacon because there is nothing in location X

    Very tedious, arduous and stupidly random lol. IDK why it works this way but I guess we all know SC is a strange bitch. Oh well, there's one new thing learned lol



    None.

    Sep 24 2017, 10:42 am Wormer Post #4



    That's the reason we love Star Craft mapmaking so much! :D Maybe it's not the beacon itself, but like All Players doesn't include Player 12 in conditions at all?

    Also you can do it with at least 9 less triggers and 1 less switch:

    TIMER AND RANDOMIZER
    Players

  • Player 7
  • Conditions

  • Always
  • Actions

  • Modify death counts for Current Player: Add 1 for Hill Move Counter
  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Preserve Trigger


  • MOVE BEACON TO HILL N BECAUSE RANDOMNESS HAPPENED AND THERE'S NOTHING THERE
    Players

  • Player 7
  • Conditions

  • Current Player has suffered at least 72 deaths of Hill Move Counter
  • Switch 1 is Cleared/Set (N)
  • Switch 2 is Cleared/Set (N)
  • Switch 3 is Cleared/Set (N)
  • All Players brings exactly 0 [any unit] to Hill N
  • Neutral brings exactly 0 Protoss Beacon to Hill N
  • Actions

  • Modify death counts for Current Player: Set to 0 for Hill Move Counter
  • Remove All Protoss Beacon or All Players at "Field"
  • Move 1 Protoss Beacon for Neutral at "Beacons" to "Hill N"
  • Preserve Trigger


  • Post has been edited 3 time(s), last time on Sep 24 2017, 12:20 pm by Wormer.



    Some.

    Sep 24 2017, 4:06 pm m.0.n.3.y Post #5



    Quote from Wormer
    That's the reason we love Star Craft mapmaking so much! :D Maybe it's not the beacon itself, but like All Players doesn't include Player 12 in conditions at all?

    Also you can do it with at least 9 less triggers and 1 less switch:

    TIMER AND RANDOMIZER
    Players

  • Player 7
  • Conditions

  • Always
  • Actions

  • Modify death counts for Current Player: Add 1 for Hill Move Counter
  • Randomize Switch 1
  • Randomize Switch 2
  • Randomize Switch 3
  • Preserve Trigger


  • MOVE BEACON TO HILL N BECAUSE RANDOMNESS HAPPENED AND THERE'S NOTHING THERE
    Players

  • Player 7
  • Conditions

  • Current Player has suffered at least 72 deaths of Hill Move Counter
  • Switch 1 is Cleared/Set (N)
  • Switch 2 is Cleared/Set (N)
  • Switch 3 is Cleared/Set (N)
  • All Players brings exactly 0 [any unit] to Hill N
  • Neutral brings exactly 0 Protoss Beacon to Hill N
  • Actions

  • Modify death counts for Current Player: Set to 0 for Hill Move Counter
  • Remove All Protoss Beacon or All Players at "Field"
  • Move 1 Protoss Beacon for Neutral at "Beacons" to "Hill N"
  • Preserve Trigger

  • Yeah I'm not sure! More testing would be needed to figure out the specifics. I'm just curious WHY it would be that way. There's got to be some logical explanation lol?

    Actually I think I need all the triggers, because I need it to be like an OR statement. Where if All Players brings exactly 0 [any unit] to Hill N, OR, Neutral brings exactly 0 Protoss Beacon to Hill N, then reroll the randomization process.

    Putting both All Players brings exactly 0 [any unit] to Hill N AND Neutral brings exactly 0 Protoss Beacon to Hill N makes it an AND statement where both of them have to be true in order to fire, right?



    None.

    Sep 24 2017, 10:32 pm Wormer Post #6



    This is only the one of the many weird things.

    Yes, my trigger has AND. You can do OR with an additional location and 2 more triggers. :rolleyes:



    Some.

    Sep 25 2017, 8:59 am m.0.n.3.y Post #7



    Quote from Wormer
    This is only the one of the many weird things.

    Yes, my trigger has AND. You can do OR with an additional location and 2 more triggers. :rolleyes:
    Wow this quirks thing is really useful! Wish i had seen this before haha



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [03:33 pm]
    O)FaRTy1billion[MM] -- o sen is back
    [01:53 am]
    Ultraviolet -- :lol:
    [06:51 pm]
    Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
    [06:50 pm]
    NudeRaider -- Vrael
    Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
    sounds like moisture control is often a pressing concern in your city
    [06:50 pm]
    Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
    [06:49 pm]
    Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
    [06:48 pm]
    Vrael -- On this Topic, I could definitely use some Introductions.
    [06:48 pm]
    Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
    [06:47 pm]
    Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
    [06:45 pm]
    NudeRaider -- Vrael
    Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
    beats me, but I'd make sure to pick the epitome of excellence and nothing less.
    Please log in to shout.


    Members Online: NudeRaider, jjf28