Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Preserved Conditions and Actions
Preserved Conditions and Actions
Jan 23 2010, 9:39 pm
By: Elward  

Jan 23 2010, 9:39 pm Elward Post #1



Which of these is faster, assuming they don't fire constantly?

-=SAMPLE 1=-
-Player 1 Brings at least 1 Marine to Location
=Remove all Marines for Player 1 at Location
=Preserve

-=SAMPLE 2=-
-Always
=Remove all Marines for Player 2 at Location
=Preserve



None.

Jan 23 2010, 9:39 pm Falkoner Post #2



The trigger function of this site doesn't work, it just makes your posts blank, remove the Trigger tags and that should fix it.



None.

Jan 23 2010, 9:44 pm JaFF Post #3



Quote from Elward
Which of these is faster, assuming they don't fire constantly?

-=SAMPLE 1=-
-Player 1 Brings at least 1 Marine to Location
=Remove all Marines for Player 1 at Location
=Preserve

-=SAMPLE 2=-
-Always
=Remove all Marines for Player 2 at Location
=Preserve
How can they not fire constantly if the second trigger is always-preserved? Not preserving it would defeat the purpose of having it, because it will only run once at the beginning. If you mean to ask which one will detect and delete the unit(s) faster, they are equal in that respect.



None.

Jan 23 2010, 9:53 pm Elward Post #4



Let's assume there's a large length of time when no player has a Marine at Location. Which trigger lags less?



None.

Jan 23 2010, 9:58 pm Falkoner Post #5



The Sample 2 will actually delete the unit faster, however, it will cause more lag to your map as well, and it's only a fraction of a second faster. Bring takes a bit to update, even if the unit is there.



None.

Jan 23 2010, 10:20 pm Kaias Post #6



Quote from Falkoner
The Sample 2 will actually delete the unit faster, however, it will cause more lag to your map as well, and it's only a fraction of a second faster. Bring takes a bit to update, even if the unit is there.
No, one is not faster than the other. It is better to minimize how often those conditions run, however, so it is better to have the bring condition.



None.

Jan 23 2010, 10:22 pm JaFF Post #7



Quote from Falkoner
The Sample 2 will actually delete the unit faster, however, it will cause more lag to your map as well, and it's only a fraction of a second faster. Bring takes a bit to update, even if the unit is there.
You sure about this? I thought bring has a delay only when it comes detecting dead units. Test map?

And yes, the second one will lag less in theory. But in practice, you can copy that trigger a hundred times and it won't lag, so it doesn't really matter.



None.

Jan 23 2010, 10:30 pm ClansAreForGays Post #8



Didn't we have a thread some time ago where we found that "bring" fires faster than command?




Jan 23 2010, 10:45 pm rockz Post #9

ᴄʜᴇᴇsᴇ ɪᴛ!

In terms of game time, they are identical. Everything else is arguing about nanoseconds. Actions lag more than conditions, so NOT running a trigger is better than running one.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 23 2010, 11:30 pm Kaias Post #10



Quote from ClansAreForGays
Didn't we have a thread some time ago where we found that "bring" fires faster than command?
"Fire faster" isn't quite the right way to describe it. The definitions for the "Command" condition update less frequently than "Bring". Namely, with "Bring" you don't really need to worry about it, unless you're trying to do binary count offs with units. Whereas with "Command" you can remove all units for all players and in the same loop it'll still register those units in "Command".



None.

Jan 24 2010, 2:17 am rockz Post #11

ᴄʜᴇᴇsᴇ ɪᴛ!

If the wiki is wrong, Kaias (or anyone else), please change it. I don't feel like testing (since obviously its been done before).
http://www.staredit.net/wiki/Bring



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 24 2010, 2:21 am Falkoner Post #12



I don't really have a test for it(no idea how you could), but there is a sort of updating to bring, and so if a unit walked in, I'm unsure if they would fire the same or not, but I do know for certain, that if you Created the unit there, with a trigger directly preceding the other 2, the second trigger would fire first, and the first one would take an extra trigger loop to respond to the unit being there.



None.

Jan 24 2010, 6:11 pm NudeRaider Post #13

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Let's just pretend I didn't say anything :><: Especially in light of Falks nice clarification:
Quote from Falkoner
how it works is Bring runs at the same speed as Always, if the unit walks in, or is moved into the location, however, if it is given from another player already in the location, or created there, then the bring will take an extra trigger loop to respond, unless you also run one of the actions listed in Nude's post after giving or creating the unit there, before the Bring conditions checks.
Actions listed in Nude's post:
Quote from DiscipleofAdun

Kill Unit
Kill Unit at Location
Remove Unit
Remove Unit At Location
Move Location
Move Unit

Quote from Falkoner
The trigger function of this site doesn't work, it just makes your posts blank, remove the Trigger tags and that should fix it.
Oh?
Trigger
Players
  • Conditions
  • Player 1 Brings at least 1 Marine to Location
  • Actions
  • Remove all Marines for Player 1 at Location
  • Preserve


  • Post has been edited 2 time(s), last time on Jan 25 2010, 2:42 am by NudeRaider. Reason: removed ambiguousness




    Jan 24 2010, 6:37 pm Kaias Post #14



    Quote from NudeRaider
    Falk is right, bring is firing 1 trigger loop later than always, unless you're doing one of these actions before that trigger:
    Quote from DiscipleofAdun
    Kill Unit
    Kill Unit at Location
    Remove Unit
    Remove Unit At Location
    Move Location
    Move Unit
    Not correct; the trigger run through begins will all the 'Bring' definitions marked invalid (so to speak), meaning it will be updated upon the bring condition being analyzed. One will be just as fast as the other. The only thing that could change the results for 'Bring' that it won't necessarily recognize are the Create and Give actions, and even then chances are that the definitions will be marked invalid when it gets to it. Not that that matters anyway since I'm pretty sure he is using it only in the context of players walking their units into the location.

    AKA Same response time.



    None.

    Jan 24 2010, 9:20 pm JaFF Post #15



    Bring also fails to detect the death of a unit every second frame.



    None.

    Jan 24 2010, 10:58 pm Kaias Post #16



    Quote from JaFF
    Bring also fails to detect the death of a unit every second frame.
    Not really true.

    When units die they have one frame where they are at 0 health and designated to die. For that frame they are technically still there, have a collision area that can displace, can be detected with bring and can even be given (but cannot be moved). When you kill a unit with triggers, they are set to that 0 health dead-but-not-dead state. Since triggers run every other frame with hyper-triggers, there is essentially a 50% chance that a unit killed (not by triggers) will be in that state when the triggers run.

    So the "Kill" action isn't so much a "Kill" action as it is a "Sentence to death" action.



    None.

    Jan 24 2010, 11:28 pm JaFF Post #17



    Ahh. This makes sense. I didn't know about the 0 hp mechanics.



    None.

    Jan 25 2010, 12:05 am Falkoner Post #18



    Quote from NudeRaider
    Falk is not right, bring is not firing 1 trigger loop later than always, unless you're doing one of these actions before that trigger getting a unit inside not using any of these actions: (and not walking in)
    Quote from DiscipleofAdun
    Kill Unit
    Kill Unit at Location
    Remove Unit
    Remove Unit At Location
    Move Location
    Move Unit
    aka by
    Quote from Kaias
    Create and Give actions


    Quote from Falkoner
    The trigger function of this site doesn't work, it just makes your posts blank, remove the Trigger tags and that should fix it.
    Oh?

    Trigger
    Players
  • Conditions
  • Player 1 Brings at least 1 Marine to Location
  • Actions
  • Remove all Marines for Player 1 at Location
  • Preserve

  • Is that not what I said?

    Quote
    I don't really have a test for it(no idea how you could), but there is a sort of updating to bring, and so if a unit walked in, I'm unsure if they would fire the same or not, but I do know for certain, that if you Created the unit there, with a trigger directly preceding the other 2, the second trigger would fire first, and the first one would take an extra trigger loop to respond to the unit being there.

    While I didn't have all the facts, I wouldn't say I'm incorrect :ermm:

    Quote
    So the "Kill" action isn't so much a "Kill" action as it is a "Sentence to death" action.

    Yeah, for example, if you had a trigger that killed a science vessel, the trigger directly after it would still detect it as there with Bring, even after being "killed".

    Oh, also, Nude, when he first posted his post was blank, and once I posted that he edited it, removing the trigger and it showed up, I've also had the same experience.

    EDIT: Rereading Nude's post, it seems pretty unclear to me what he's saying, due to the crossing out and such, I'm pretty sure how it works is Bring runs at the same speed as Always, if the unit walks in, or is moved into the location, however, if it is given from another player already in the location, or created there, then the bring will take an extra trigger loop to respond, unless you also run one of the actions listed in Nude's post after giving or creating the unit there, before the Bring conditions checks.

    Post has been edited 1 time(s), last time on Jan 25 2010, 12:13 am by Falkoner.



    None.

    Feb 1 2010, 1:08 am Sacrieur Post #19

    Still Napping

    Kaias is right, the difference is so minuscule it doesn't even matter. This is like nanosecond differences, if even that.



    None.

    Feb 1 2010, 3:41 am Falkoner Post #20



    Well, it's actually a 12th of a second difference(8th of an in-game second) if you wanna get precise, but it can make all the difference in a trigger system that relies on StarCraft functioning one way or the other.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [10:53 pm]
    Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
    [2024-5-04. : 1:05 am]
    Vrael -- I won't stand for people going around saying things like im not a total madman
    [2024-5-04. : 1:05 am]
    Vrael -- that's better
    [2024-5-04. : 12:39 am]
    NudeRaider -- can confirm, Vrael is a total madman
    [2024-5-03. : 10:18 pm]
    Vrael -- who says I'm not a total madman?
    [2024-5-03. : 2:26 pm]
    UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
    [2024-5-02. : 1:19 pm]
    Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
    [2024-5-02. : 1:35 am]
    Ultraviolet -- Vrael
    Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
    Gonna put deez sportballs in your mouth
    [2024-5-01. : 1:24 pm]
    Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
    [2024-4-30. : 5:08 pm]
    Oh_Man -- https://youtu.be/lGxUOgfmUCQ
    Please log in to shout.


    Members Online: Roy