Staredit Network > Forums > SC1 Mapping Tools > Topic: Oreo Triggers
Oreo Triggers
Jun 2 2012, 9:22 am
By: Kaias
Pages: < 1 3 4 5
 

Dec 30 2015, 4:12 pm Zoan Post #81

Math + Physics + StarCraft = Zoan

Hey, I'm using this action:

SetInvincibility("Player 12", "Men", $location, "enabled"),

and it's outputting to the triggers the following:

Set Invincibility("Player 12", "Men", "Location 4", set);

which doesn't compile in scmdraft since the correct keywords for the invincibility trigger are "enabled" and "disabled," not "set" and "clear".

Edit: I was messing with this some more, and found that if you go into the Actions.php file and comment out the line GetMintStateConversion($state); in the set invincibility trigger, it compiles to "enabled" instead of "set".

Post has been edited 1 time(s), last time on Dec 30 2015, 4:34 pm by Zoan.



\:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

Dec 30 2015, 6:38 pm Kaias Post #82



Quote from Zoan
Hey, I'm using this action:

SetInvincibility("Player 12", "Men", $location, "enabled"),

and it's outputting to the triggers the following:

Set Invincibility("Player 12", "Men", "Location 4", set);

which doesn't compile in scmdraft since the correct keywords for the invincibility trigger are "enabled" and "disabled," not "set" and "clear".

Edit: I was messing with this some more, and found that if you go into the Actions.php file and comment out the line GetMintStateConversion($state); in the set invincibility trigger, it compiles to "enabled" instead of "set".

That's a bug. Looks like the line should be moved down one to be under 'if Minted'.



None.

Dec 31 2015, 7:52 pm Zoan Post #83

Math + Physics + StarCraft = Zoan

Hey, I have the following code in my map file:

$Speed1 = new Deathcounter(P8, 500);
.
.
.
$temp1 = new TempDC(P8, 500);

$F1->_if( $BattlePhase->Exactly(6),
Bring("Player 1", $Shuttle->Unit, "Exactly", 1, $Battle->Location) )

->then( $temp1->Become($Speed1),
'');
.
.
.
$temp1->kill();

But what it's outputting to the triggers is the following:


Trigger
Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Deaths("Current Player", "Start Location", Exactly, 6);
  • Bring("Player 1", "Protoss Shuttle", "Location 4", Exactly, 1);
  • Actions

  • Preserve Trigger();
  • Set Deaths("Player 2", "Duke Turret type 2", Set To, 0);
  • Set Switch("Switch1", set);
  • Comment("");


  • Trigger
    Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Switch("Switch1", set);
  • Deaths("Player 1", "Mining Platform", At least, 1);
  • Actions

  • Preserve Trigger();
  • Set Deaths("Player 2", "Duke Turret type 2", Add, 1);
  • Set Deaths("Player 1", "Mining Platform", Subtract, 1);
  • Comment("");


  • Trigger
    Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Switch("Switch1", set);
  • Actions

  • Preserve Trigger();
  • Set Switch("Switch1", clear);
  • Comment("");


  • So, how do I make it so it has a larger binary cutoff thing? I mean it should go up to 256, not just stop at 1 in the middle, right?

    Edit: So I changed the $Speed1 = new Deathcounter(P8, 500); to just $Speed1 = new Deathcounter(); and it works now, though the binary cutoff thing goes up to 1073741824, or 2^30. Is there a way to get rid of this redundancy?

    Post has been edited 2 time(s), last time on Dec 31 2015, 8:06 pm by Zoan.



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Jan 1 2016, 12:14 am Kaias Post #84



    Quote from Zoan
    Hey, I have the following code in my map file:

    $Speed1 = new Deathcounter(P8, 500);
    .
    .
    .
    $temp1 = new TempDC(P8, 500);

    $F1->_if( $BattlePhase->Exactly(6),
    Bring("Player 1", $Shuttle->Unit, "Exactly", 1, $Battle->Location) )

    ->then( $temp1->Become($Speed1),
    '');
    .
    .
    .
    $temp1->kill();

    But what it's outputting to the triggers is the following:


    Trigger
    Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Deaths("Current Player", "Start Location", Exactly, 6);
  • Bring("Player 1", "Protoss Shuttle", "Location 4", Exactly, 1);
  • Actions

  • Preserve Trigger();
  • Set Deaths("Player 2", "Duke Turret type 2", Set To, 0);
  • Set Switch("Switch1", set);
  • Comment("");


  • Trigger
    Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Switch("Switch1", set);
  • Deaths("Player 1", "Mining Platform", At least, 1);
  • Actions

  • Preserve Trigger();
  • Set Deaths("Player 2", "Duke Turret type 2", Add, 1);
  • Set Deaths("Player 1", "Mining Platform", Subtract, 1);
  • Comment("");


  • Trigger
    Players

  • Player 1
  • Player 2
  • Player 3
  • Conditions

  • Switch("Switch1", set);
  • Actions

  • Preserve Trigger();
  • Set Switch("Switch1", clear);
  • Comment("");


  • So, how do I make it so it has a larger binary cutoff thing? I mean it should go up to 256, not just stop at 1 in the middle, right?

    Edit: So I changed the $Speed1 = new Deathcounter(P8, 500); to just $Speed1 = new Deathcounter(); and it works now, though the binary cutoff thing goes up to 1073741824, or 2^30. Is there a way to get rid of this redundancy?

    I don't see a problem with your code. The output doesn't match my expectations. A few things:
    Killing a TempDC returns an action setting it to 0, so you should put the kill in a trigger to always properly clear it for reuse.

    Become is effectively:
    $temp1->setTo($Speed1)
    $Speed1->setTo(0)
    Just done more efficiently. Does replacing the become with those two actions work properly?

    I can't think of a non-fringe case where TempDC needs to have a player specified for it. Unless you're utilizing "Current Player" you probably don't need to specify a player on Speed1 either. Have you tried just doing $Speed1 = new Deathcounter(500)?

    Unfortunately I don't have the ability to run Oreo with this computer to test anything myself.

    Post has been edited 1 time(s), last time on Jan 1 2016, 12:27 am by Kaias.



    None.

    Jan 1 2016, 12:30 am Zoan Post #85

    Math + Physics + StarCraft = Zoan

    Quote from Kaias
    I don't see a problem with what your code. The output doesn't match my expectations. A few things:
    Killing a TempDC returns an action setting it to 0, so you should put the kill in a trigger to always properly clear it for reuse.

    Become is effectively:
    $temp1->setTo($Speed1)
    $Speed1->setTo(0)

    Just done more efficiently. Does replacing the become with those two actions work properly?

    I can't think of a non-fringe case where TempDC needs to have a player specified for it. Unless you're utilizing "Current Player" you probably don't need to specify a player on Speed1 either. Have you tried just doing $Speed1 = new Deathcounter(500)?

    Unfortunately I don't have the ability to run Oreo with this computer to test anything myself.

    Huh, yea I tried $Speed1 = new Deathcounter(500) and it worked then. (I didn't do this originally because I thought you needed to put a dummy player in the first slot in order to input the number - my bad). Weird. Well, I won't question it - Thanks!

    Also thanks for the tip on the kill function - I wasn't sure if that was just a thing for php or for the map itself.



    \:rip\:ooooo\:wob\:ooooo \:angel\: ooooo\:wob\:ooooo\:rip\:

    Aug 11 2017, 9:55 am BumpelSnake Post #86



    Hello Kaias, everyone here,


    I hope this project is still living and active! It's great work!

    Unfortunately I have a problem I couldn't find any info about, so I guess I just post it here:

    I configured Oreo and Mint as instructed, it generates triggers as expected; Mint creates the map file, but all it inserts are four hyper triggers. Why is that?

    The PHP:


    The browser output:


    Oreo doesn't seem to generate logs. Maybe there is a mode to turn it on?


    Thanks in advance!

    _________

    edit: I also noticed that the automatically generated hyper triggers do not have conditions at all. Not even a 'conditions:' section in the trigger syntax in the generated browser output - and consequently there are also no conditions in the hyper triggers of the map file generated by Mint. Is this intended?

    Apart from this, can you turn off the automatic generation of hyper triggers in Oreo? Or even configure what type of hyper triggers to generate?

    Post has been edited 1 time(s), last time on Aug 11 2017, 10:15 am by BumpelSnake.



    None.

    Aug 13 2017, 2:54 am Butch Post #87

    PROFESSIONAL MAP MAKER

    I always have the Mint line at the top of my code, I'm not sure if that makes a difference, probably not, but I'd try it.

    as for hyper triggers, you cannot turn them off aside from editing the Oreo code. I'm not sure why you would want to turn them off anyways. If a trigger has 0 conditions, its the same as having always() as a condition.



    None.

    Options
    Pages: < 1 3 4 5
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [06:06 am]
    NudeRaider -- KrayZee
    KrayZee shouted: Voyager7456 Somehow I misread your shout. "Glad I can entertain you in Nude" as if you sent a racy photo, video or something.
    nah, he just made a comment that had us laughing very hard.
    [06:02 am]
    NudeRaider -- Zoan
    Zoan shouted: sraw531 you can’t move buildings afaik
    yes you can.
    [2019-10-16. : 10:03 pm]
    Dem0n -- no
    [2019-10-16. : 8:26 pm]
    GGmano -- Is here a forum only for temple siege?
    [2019-10-16. : 4:20 pm]
    KrayZee -- Voyager7456
    Voyager7456 shouted: Glad I can entertain you Nude
    Somehow I misread your shout. "Glad I can entertain you in Nude" as if you sent a racy photo, video or something.
    [2019-10-16. : 2:26 pm]
    martosss -- Moose
    Moose shouted: martosss IIRC, the plan was to go 64-bit only eventually so they're interested in differences between the versions
    well I might have found 1 bug for them to fix - some maps load on 32 bit, but not on 64 bit game version
    [2019-10-16. : 2:19 pm]
    Zoan -- sraw531
    sraw531 shouted: I'm pretty sure you would move the building away at some point. When you do so, you can give it to someone else. I was thinking nexi because its possible you could encourage the computer to expand to a specific spot
    you can’t move buildings afaik
    [2019-10-16. : 10:10 am]
    Moose -- martosss
    martosss shouted: jjf28 OK, I have 1 more question - are you using 32 bit SC:R or 64 bit ? In game settings there's an option to switch to 32, is it checked? I just tried hosting the map with 64-bit SC:R and it failed... I ticked the option to use 32 bit SC:R => it worked and map was hosted. So I guess the issue still exists for 64 bit SC:R ? I also tried calling a friend and he couldn't see the map when he entered the lobby. Weird, I might have to report this to Blizzard?
    IIRC, the plan was to go 64-bit only eventually so they're interested in differences between the versions
    [2019-10-16. : 5:27 am]
    O)FaRTy1billion[MM] -- or a magic box :(
    [2019-10-16. : 3:31 am]
    martosss -- FaRTy1billion
    FaRTy1billion shouted: how about 5 minerals
    you can't even get a scarab with those!
    Please log in to shout.


    Members Online: Roy