Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Wait blocks wrecking RPG map
Wait blocks wrecking RPG map
Dec 24 2010, 1:20 am
By: The_UrChai  

Dec 24 2010, 1:20 am The_UrChai Post #1



My map needs hyper triggers to work well and I have a spell that goes like such: It follows the observer and keeps creating scouts at that location to attack.

Conditions: Blah Blah cast spell stuff
Actions: Center location over (spellcaster)
Create 1 (spell centerer) at location
Center location over (spell centerer)
Create 2 (spell attackers) at location
wait 200ms
Kill 2 (spell attackers)
Center location over (spell centerer)
Create 2 (spell attackers) at location
wait 200ms
Kill 2 (spell attackers)
Preserve trigger

The wait triggers make it really slow and long.
I heard you can use death counters to avoid wait blocks but I'm not sure how to go about doing this.



None.

Dec 24 2010, 3:10 am Jesusfreak Post #2



First you need a death counter, preferably something not used in your map. Ie, Cantina.

Make a trigger saying that

Conditions:
Current Player suffers at least 1 deaths of Cantina
Actions:
Modify deaths for Current Player: Add 1 for Cantina
Preserve Trigger

Now, 11.9 (about 12) death counts is equal to one second with hypertriggers. So, 2.4 death counters is equal to 200 milliseconds... hrm, that might be a problem. May have to round a bit, if that's ok with you.

Conditions:
Current Player suffers at least 4 deaths of Cantina
Actions
(do whatever the spell is supposed to do)
Modify deaths for Current Player: Set to 0 for Cantina (or set to 1 if you want the timer to restart)
Preserve trigger


I don't think I explained it very well... gah :(.



None.

Dec 24 2010, 3:24 am The_UrChai Post #3



That's what I thought. I'll need to break up the trigger into multiple parts because of the multiple waits correct? What I want is for it to do the first part of the spell then do it again so it'll look like:
SPELL
Conditions: cast spell (built zealot at location)
Actions:set switch (death counter)
Kill zealot at location
preserve trigger
DEATH COUNTER
Conditions: switch death counter is set
action: add 2 for unused unit
preserve trigger

SPELL ACTIONS:
Condition: deaths is 2 unused unit for current player
Actions do spell attack
set deaths to 3 of unused unit for current player
preserve trigger

SPELL ACTIONS: (I want it to attack twice per spell cast)
Conditions: Deaths 5 for unused unit
Actions: Spell attack
clear switch Death counter
preserve trigger



None.

Dec 24 2010, 4:20 am Vrael Post #4



If you're properly using hyper triggers in your map, each trigger cycles runs after ~ 1/12 of a second, roughly 84ms, so we typically use the conversion rate 12 death counts = 1 second. So 168ms = 2 DC, and 252 ms = 3 DC. Unfortunately you can't do exactly 200ms, but who can tell the difference. I'll use 168ms instead. The way I would set up your triggers is like this:

Code
Conditions:
Exactly 0 deaths of DC
Bring 1 zealot to Spell area

Actions:
Set DC to 5
Center Spell Location
Create 2 Spell Unit @ Spell Location
preserve trigger


Code
Conditions:
Exactly 3 deaths of DC

Actions:
Center Spell Location
Kill 2 Spell Unit @ Spell Location
Create 2 Spell Unit @ Spell Location
preserve trigger


Code
Conditions:
Exactly 1 deaths of DC

Actions:
Center Spell Location
Kill 2 Spell Unit @ Spell Location
preserve trigger


Code
Conditions:
Current player has suffered at least 1 deaths of DC

Actions:
Subtract 1 deaths of DC for current player
preserve trigger




None.

Dec 24 2010, 5:20 am The_UrChai Post #5



It works great! except I was busy adding the triggers before your advice Vrael, so I used an add unit death instead of a subtract unit death. I ended up using the wait trigger for the last spell attack to add a sort of spell duration variability to make it interesting. Well that should be the most complicated of my spells so all thats left is the time consuming spells and balancing it all. :D



None.

Dec 24 2010, 10:20 pm DavidJCobb Post #6



Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a long time ago, and it seemed to treat Current Player like a separate (extended) player.

Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.

Trigger
Players
  • Player 2
  • Force 3
  • Conditions
  • Current Player has suffered 3 deaths of Terran Marine.
  • Actions
  • Preserve trigger.




  • None.

    Dec 25 2010, 12:47 am The_UrChai Post #7



    Quote from DavidJCobb
    Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a long time ago, and it seemed to treat Current Player like a separate (extended) player.
    Well it works for me. Haven't really gotten to test multiplayer.



    None.

    Dec 25 2010, 12:50 am Kaias Post #8



    Quote from DavidJCobb
    Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a long time ago, and it seemed to treat Current Player like a separate (extended) player.

    Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.

    Trigger
    Players
  • Player 2
  • Force 3
  • Conditions
  • Current Player has suffered 3 deaths of Terran Marine.
  • Actions
  • Preserve trigger.
  • Current player works just fine.

    Your Demo trigger would be run once for each player in Force 3 and Player 2 (Player 2 at most once if also in Force 3) in the order of first player to eighth player (whichever are in trigger owners) each time with that player owner in place of current player.

    But I'm sure you know all that.



    None.

    Dec 25 2010, 1:54 am DavidJCobb Post #9



    Quote from Kaias
    Quote from DavidJCobb
    Wait -- you're using deaths for Current Player, and it's not breaking? Because I used the Deaths condition and Set Deaths action for Current Player units in a vehicle system I made a long time ago, and it seemed to treat Current Player like a separate (extended) player.

    Also, guys, we have a "trigger" BBCode. Just press the "Trigger" button, and you can type stuff in to get a formatted Trigger.

    Trigger
    Players
  • Player 2
  • Force 3
  • Conditions
  • Current Player has suffered 3 deaths of Terran Marine.
  • Actions
  • Preserve trigger.
  • Current player works just fine.

    Your Demo trigger would be run once for each player in Force 3 and Player 2 (Player 2 at most once if also in Force 3) in the order of first player to eighth player (whichever are in trigger owners) each time with that player owner in place of current player.

    But I'm sure you know all that.
    I know how Current Player works. It just didn't seem to work with DCs when I used it. The trigs ran for each player in the game, but when it came to the DCs, it seemed to use the same counter for all players -- as if Current Player were given its own DCs.



    None.

    Dec 25 2010, 6:07 am NudeRaider Post #10

    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

    DJC please don't confuse shadow. DCs for Current Player is a standard method we're using for years. It's definitely working.
    When you got a problem with them, make a thread about it and we'll solve the problem but please refrain from spreading false rumors.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [06:28 am]
    NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
    [06:26 am]
    NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
    [06:25 am]
    NudeRaider -- Symmetry
    Symmetry shouted: Ohhh imagine a SC map that could delete itself
    not the map, the editor
    [02:28 am]
    Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
    [02:28 am]
    Symmetry -- Ohhh imagine a SC map that could delete itself
    [08:51 pm]
    NudeRaider -- Symmetry
    Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
    [2026-7-15. : 4:10 am]
    Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
    [2026-7-15. : 2:19 am]
    Symmetry -- NudeRaider
    NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
    Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
    [2026-7-14. : 11:43 pm]
    Ultraviolet -- let's take each other's clothes off :teach:
    [2026-7-14. : 11:03 pm]
    Vrael -- :teach:
    Please log in to shout.


    Members Online: IskatuMesk