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.
    [07: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
    [2024-4-20. : 8:09 pm]
    Vrael -- woo baby talk about a time crunch
    [2024-4-20. : 8:08 pm]
    Vrael -- 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
    so that gives me approximately 27 more years to finish tenebrous before you get to it?
    Please log in to shout.


    Members Online: Ultraviolet