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:27 am]
    m.0.n.3.y -- Maybe because it's an EUD map?
    [03:27 am]
    m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
    [2024-4-25. : 7:46 am]
    RIVE -- :wob:
    [2024-4-22. : 6:48 pm]
    Ultraviolet -- :wob:
    [2024-4-21. : 1:32 pm]
    Oh_Man -- I will
    [2024-4-20. : 11:29 pm]
    Zoan -- Oh_Man
    Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
    You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
    [2024-4-20. : 8:18 pm]
    Ultraviolet -- Oh_Man
    Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
    oh ya I saw that when Armo posted it on Discord, pretty crazy
    [2024-4-20. : 8:09 pm]
    Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
    Please log in to shout.


    Members Online: jun3hong