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.
    [01:39 am]
    Ultraviolet -- no u elky skeleton guy, I'll use em better
    [10:50 pm]
    Vrael -- Ultraviolet
    Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    hey cut it out I'm getting all the minerals
    [10:11 pm]
    Ultraviolet -- :P
    [10:11 pm]
    Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
    [2024-4-17. : 11:50 pm]
    O)FaRTy1billion[MM] -- nice, now i have more than enough
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- if i don't gamble them away first
    [2024-4-17. : 11:49 pm]
    O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
    [2024-4-17. : 3:26 am]
    O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
    [2024-4-17. : 1:53 am]
    Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
    [2024-4-17. : 1:52 am]
    Vrael -- hah do you think I was born yesterday?
    Please log in to shout.


    Members Online: Roy