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:21 pm]
    Voyager7456 -- NudeRaider
    NudeRaider shouted: Voyager7456 there should probably be a place more obvious that gives the link to the discord server. I'd say we're past trial stage by now.
    jjf28
    jjf28 shouted: moose is no longer a mini O.O
    Yeah I've been saying for a while we should replace SC2 files in the menu (literally empty) with a link to the Discord
    [06:11 pm]
    Suicidal Insanity -- Dem0n
    Dem0n shouted: It's hardly even a SEN server honestly. Just mostly the same 10 people saying dumb shit LMAO
    Sounds like SEN shoutbox :P
    [04:47 pm]
    Dem0n -- then again w/e
    [04:46 pm]
    Dem0n -- It's hardly even a SEN server honestly. Just mostly the same 10 people saying dumb shit LMAO
    [04:46 pm]
    Dem0n -- NudeRaider
    NudeRaider shouted: Voyager7456 there should probably be a place more obvious that gives the link to the discord server. I'd say we're past trial stage by now.
    no tbh. Lots of dumb people that shouldn't be on it.
    [04:45 pm]
    Suicidal Insanity -- Naw, somebody just redefined what one standard moose is
    [04:39 pm]
    Dem0n -- Our Moosey's all grown up C|:'^ )
    [04:36 pm]
    Dem0n -- O__________________________________________________________O
    [04:17 pm]
    jjf28 -- moose is no longer a mini O.O
    [10:41 am]
    NudeRaider -- NudeRaider
    NudeRaider shouted: Voyager7456 there should probably be a place more obvious that gives the link to the discord server. I'd say we're past trial stage by now.
    In the menu. Probably an item under Site, or preferably next to Wiki
    Please log in to shout.


    Members Online: Roy, gruper385076, Voyager7456, oxygenman