Need help with triggered spell!

DummyUnit

New Member
Reaction score
1
Can someone tell me why this spell isn't working im a noobie :(
The spell is meant to freeze all units in the target area for a short time.
Trigger:
  • Time Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Time Field
    • Actions
      • Set TimeFieldCaster = (Triggering unit)
      • Set TimeFieldLoc = (Target point of ability being cast)
      • Unit - Create 1 Time Field Dummy for (Owner of (Triggering unit)) at TimeFieldLoc facing Default building facing degrees
      • Set TimeFieldDummy = (Last created unit)
      • Animation - Change TimeFieldDummy flying height to 100.00 at 0.00
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to (Casting unit)) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Trigger - Turn on Time FieldUnits <gen>
      • Wait (3.00 + (Real((Level of Time Field for (Triggering unit))))) seconds
      • Trigger - Turn off Time FieldUnits <gen>
      • Unit - Remove TimeFieldDummy from the game
      • Set TimeFieldUnits = (Units within 400.00 of TimeFieldLoc)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom script: call RemoveLocation(udg_TimeFieldLoc)
      • Custom script: call DestroyGroup (udg_TimeFieldUnits)

Trigger:
  • Time FieldUnits
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching ((Matching unit) Not equal to TimeFieldCaster)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency

The problem is that when i cast it on lots of enemy units the game lags for a long time but when i cast it on like one unit its fine. The lag only occurs once the spell is finished.
 

Squirel

New Member
Reaction score
13
The lag is probably because of the number of units... More units means more passes through the loop which makes the game lag. I'm not sure what there is to do about it...
 

Hellohihi

New Member
Reaction score
42
I dont think the Trigger - Turn on Time FieldUnits <gen> trigger is needed. WHy do it again and again every 0.25s? When it is the same effect that you already done once. Repeating it does nothing?

I'm suspecting it is the FieldUnits trigger and the action below that is causing the lag:
Trigger:
  • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
 

DummyUnit

New Member
Reaction score
1
Trigger - Turn on Time FieldUnits <gen> is used to freeze every new unit that walks into it. Also turning off
Trigger:
  • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
doesn't change the lag.
 

Hellohihi

New Member
Reaction score
42
Trigger:
  • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
      • Loop - Actions
        • Animation - Change (Picked unit)&#039;s animation speed to 100.00% of its original speed
        • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency


What is a bj_wantDestroyGroup function doing infront of the unit group loop that has the variable defined as TimeFieldUnits?
 

DummyUnit

New Member
Reaction score
1
ok i got rid of that but its still not working! :banghead:
Trigger:
  • Set TimeFieldUnits = (Units within 400.00 of TimeFieldLoc)
    • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
      • Loop - Actions
        • Animation - Change (Picked unit)&#039;s animation speed to 100.00% of its original speed
        • Unit - Unpause (Picked unit)
        • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    • Custom script: call DestroyGroup (udg_TimeFieldUnits)
    • Custom script: call RemoveLocation(udg_TimeFieldLoc)
 

mathiashl

New Member
Reaction score
0
I dont think I know what you want, but if its a spell which pauses enemys in an area so make a dummy which cast warstomp.
I dont know if its that im just a newbie
 

Nexor

...
Reaction score
74
at the periodic trigger I would check for units that aren't in the paused group. this way you won't pause them twice.
 

DummyUnit

New Member
Reaction score
1
like this?
Trigger:
  • Time Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Time Field
    • Actions
      • Set TimeFieldCaster = (Triggering unit)
      • Set TimeFieldLoc = (Target point of ability being cast)
      • Unit - Create 1 Time Field Dummy for (Owner of (Triggering unit)) at TimeFieldLoc facing Default building facing degrees
      • Set TimeFieldDummy = (Last created unit)
      • Animation - Change TimeFieldDummy flying height to 100.00 at 0.00
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to (Casting unit)) and (((Matching unit) is alive) Equal to True))) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Unit Group - Add (Picked unit) to TimeFieldUnits
      • Trigger - Turn on Time FieldUnits &lt;gen&gt;
      • Wait (3.00 + (Real((Level of Time Field for (Triggering unit))))) seconds
      • Trigger - Turn off Time FieldUnits &lt;gen&gt;
      • Unit - Remove TimeFieldDummy from the game
      • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom script: call DestroyGroup (udg_TimeFieldUnits)
      • Custom script: call RemoveLocation(udg_TimeFieldLoc)

Trigger:
  • Time FieldUnits
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching ((Matching unit) Not equal to TimeFieldCaster)) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Unit Group - Add (Picked unit) to TimeFieldUnits
 

vypur85

Hibernate
Reaction score
803
Like this, I believe:
Code:
Time FieldUnits
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup = true 
        Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching ((Matching unit) Not equal to TimeFieldCaster) and [B]((Matching unit) is in TimeFieldUnits Equal to False)[/B]) and do (Actions)
            Loop - Actions
                Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
                Unit - Pause (Picked unit)
                Animation - Change (Picked unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
                Unit Group - Add (Picked unit) to TimeFieldUnits
It's a boolean comparison. So the unit won't be unnecessarily picked.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
pick them again in the end of the trigger but check if its true instand? :p
Code:
Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching ((Matching unit) Not equal to TimeFieldCaster) and ((Matching unit) is in [COLOR="Red"][COLOR="Red"]TimeFieldUnits Equal to True[/COLOR][/COLOR])) and do (Actions)
 

vypur85

Hibernate
Reaction score
803
I missed out something. Here:

Code:
Time Field
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Time Field 
    Actions
        Set TimeFieldCaster = (Triggering unit)
        Set TimeFieldLoc = (Target point of ability being cast)
        Unit - Create 1 Time Field Dummy for (Owner of (Triggering unit)) at TimeFieldLoc facing Default building facing degrees
        Set TimeFieldDummy = (Last created unit)
        Animation - Change TimeFieldDummy flying height to 100.00 at 0.00
        Custom script:   set bj_wantDestroyGroup=true
        Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to (Casting unit)) and (((Matching unit) is alive) Equal to True))) and do (Actions)
            Loop - Actions
                Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
                Unit - Pause (Picked unit)
                Animation - Change (Picked unit)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
                Unit Group - Add (Picked unit) to TimeFieldUnits
        Trigger - Turn on Time FieldUnits <gen>
        Wait (3.00 + (Real((Level of Time Field  for (Triggering unit))))) seconds
        Trigger - Turn off Time FieldUnits <gen>
        Unit - Remove TimeFieldDummy from the game
        Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
            Loop - Actions
                Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
                Unit - Unpause (Picked unit)
                Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
        [B]Unit group - Remove all units from TimeFieldUnits[/B]
        [del]Custom script:   call DestroyGroup (udg_TimeFieldUnits)[/del]
        Custom script:   call RemoveLocation(udg_TimeFieldLoc)
 

DummyUnit

New Member
Reaction score
1
BUMP
ok so i changed it to only working on heroes.
What happens is that when you cast it on an enemy hero and the spell finishes the game lags UNTIL you kill that hero(s).
Trigger:
  • Time Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Time Field
    • Actions
      • Trigger - Turn off VertexColour &lt;gen&gt;
      • Set TimeFieldCaster = (Triggering unit)
      • Set TimeFieldLoc = (Target point of ability being cast)
      • Unit - Create 1 Time Field Dummy for (Owner of (Triggering unit)) at TimeFieldLoc facing Default building facing degrees
      • Set TimeFieldDummy = (Last created unit)
      • Animation - Change TimeFieldDummy flying height to 100.00 at 0.00
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to TimeFieldCaster) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Unit Group - Add (Picked unit) to TimeFieldUnits
      • Trigger - Turn on Time FieldUnits &lt;gen&gt;
      • Wait (3.00 + (Real((Level of Time Field for (Triggering unit))))) seconds
      • Trigger - Turn off Time FieldUnits &lt;gen&gt;
      • Unit - Remove TimeFieldDummy from the game
      • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit Group - Remove all units from TimeFieldUnits
      • Custom script: call RemoveLocation(udg_TimeFieldLoc)
      • Trigger - Turn on VertexColour &lt;gen&gt;

Trigger:
  • Time FieldUnits
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to TimeFieldCaster) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
          • Unit Group - Add (Picked unit) to TimeFieldUnits
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
U need to store and destroy those unit groups
 

DummyUnit

New Member
Reaction score
1
Trigger:
  • Time Field
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Time Field
    • Actions
      • Unit Group - Remove all units from TimeFieldUnits
      • Trigger - Turn off VertexColour &lt;gen&gt;
      • Set TimeFieldCaster = (Triggering unit)
      • Set TimeFieldLoc = (Target point of ability being cast)
      • Unit - Create 1 Time Field Dummy for (Owner of (Triggering unit)) at TimeFieldLoc facing Default building facing degrees
      • Set TimeFieldDummy = (Last created unit)
      • Animation - Change TimeFieldDummy flying height to 100.00 at 0.00
      • Trigger - Turn on Time FieldUnits &lt;gen&gt;
      • Wait (3.00 + (Real((Level of Time Field for (Triggering unit))))) seconds
      • Trigger - Turn off Time FieldUnits &lt;gen&gt;
      • Unit - Remove TimeFieldDummy from the game
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in TimeFieldUnits and do (Actions)
        • Loop - Actions
          • Animation - Change (Picked unit)&#039;s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Custom script: call RemoveLocation(udg_TimeFieldLoc)
      • Trigger - Turn on VertexColour &lt;gen&gt;

Trigger:
  • Time FieldUnits
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Set TimeFieldTargets = (Units within 400.00 of TimeFieldLoc matching (((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is A structure) Equal to False)) and ((Matching unit) Not equal to TimeFieldCaster)))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 400.00 of TimeFieldLoc matching (((Matching unit) Not equal to TimeFieldCaster) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to TimeFieldUnits
          • Animation - Change (Picked unit)&#039;s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Animation - Change (Picked unit)&#039;s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top