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.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top