Help - Special Effect

looneygr

New Member
Reaction score
0
Hello. I'm trying to make a spell that heals all allies units within 600 range of a specific point every second for X seconds. I want every second for X seconds, units within range to have a special effect.
My code is:

Code:
    Events
        Skip
    Conditions
        Skip
    Actions
        Custom Script: local location udg_mypoint
        Custom Script: local group udg_mygroup
        Custom Script: local integer udg_myint
        Custom Script: local effect array udg_myfx
        Unit - Create 1 Dummy_Unit for (Owner of (Triggering Unit)) at (Target point of ability being cast) facing Default building facing degrees
        Add a 8 second Generic expiration timer to (Last created unit)
        Set mypoint = (Position of (Last created Unit))
        Set mygroup = (Units within 600 range of my point matching ((((Matching unit) is Alive) Equal to True) and (((Matching unit) belongs to an Ally of (Owner of (Triggering Unit))) Equal to True)))
        For each (Integer A) 1 to 8, do (Actions) 
                Loop - Actions
                        Unit Group - Pick every unit in mygroup and do (Actions)
                                Set myint = (myint + 1)
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
                                Set myfx[myint] = (Last created special effect)
                        Wait 1.00 seconds
                        For each (Integer A) 1 to (Number of Units in mygroup), do (Actions)
                               Special Effect - Destroy myfx[(Integer A)]
        call RemoveLocation (udg_mypoint)
        call DestroyGroup (udg_mygroup)

The special effect occurs only once. Help me please.

Sorry for my bad English.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Why do you use custom scripts? I don't understand what r the custom scripts doing. First make a trigger when the spell is casted to turn on this trigger:

Code:
E: Every X second of game time
C:
A: Set Point = Targeted point of ability is being cast
Set Group = Units within 600 range of ur point matching condition: Matching unit is immune equal to false and matching unit is an ally of owner of ur unit equal to true and matching unit is a structure equal to false and matching unit is alive equal to true
Pick every unit in Group and do Actions
Loop:     Set Unit - Picked unit
          Unit - Set life of Unit to life of unit + X
          Special Effect - Create special effect attached to the X of Unit
          call RemoveLocation (udg_Point)
          call DestroyGroup(udg_Group)
          Turn off this trigger
 

looneygr

New Member
Reaction score
0
Why do you use custom scripts? I don't understand what r the custom scripts doing. First make a trigger when the spell is casted to turn on this trigger:

Code:
E: Every X second of game time
C:
A: Set Point = Targeted point of ability is being cast
Set Group = Units within 600 range of ur point matching condition: Matching unit is immune equal to false and matching unit is an ally of owner of ur unit equal to true and matching unit is a structure equal to false and matching unit is alive equal to true
Pick every unit in Group and do Actions
Loop:     Set Unit - Picked unit
          Unit - Set life of Unit to life of unit + X
          Special Effect - Create special effect attached to the X of Unit
          call RemoveLocation (udg_Point)
          call DestroyGroup(udg_Group)
          Turn off this trigger

Custom scripts are for making the spell MUI. ( I think so ... :p )
So my spell has to make an AOE heal. So everyone healed by that will have a SFX on them(e.g Healing spray SFX). Even if i try it with your way the SFX will NOT be destroyed.! So ...
I think that something happens with the Integer Loops. Dunno what. Even if i put 2 different integer loops (1st.Integer A, 2nd.Integer B) in 2 different triggers something happens and both do not work(Maybe only one doesn't work but i want them both.).

This is my 5th day of triggering so i'm a little newbie. Any help is appreciated.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Locals do not make it MUI. If you're takling about making it MUI in Jass, then I think you need structs.
 

looneygr

New Member
Reaction score
0
Locals do not make it MUI. If you're takling about making it MUI in Jass, then I think you need structs.

erm then my bad.I think i've missed the MUI class lessons :p. As i said i'm a little newbie :)!
Forgot to say that by dummy spell is based on fan of knives(with negative values of course).
 

denmax

You can change this now in User CP.
Reaction score
155
Not all things, especially those that damage, can be used as a negative value.

Putting a negative value for your Fan of Knives wouldn't heal, if it does then I guess that's the only spell that does

Code:
        For each (Integer A) 1 to 8, do (Actions) 
                Loop - Actions
                        Unit Group - Pick every unit in mygroup and do (Actions)
                                Set myint = (myint + 1)
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
                                Set myfx[myint] = (Last created special effect)
                        Wait 1.00 seconds
                        For each (Integer A) 1 to (Number of Units in mygroup), do (Actions)
                               Special Effect - Destroy myfx[(Integer A)]

Firstly, you cannot loop with waits, inside or outside of the Loop - Actions. It seriously bugs up. Another is that your other Integer Loop, which is also A, malfunctions, if you place a loop under a loop then it should use a different integer
 

FireBladesX

Eating my wings!
Reaction score
123
Putting a negative value for your Fan of Knives wouldn't heal, if it does then I guess that's the only spell that does

Sorry to be a little bitch, but yeah it heals, and it's certainly not the only one that does. Dota's Necrolyte's death pulse skill used to be a negative fan of knives, but they since changed it (I don't know how) so that it wouldn't dispel Healing Salve or Clarity Potion.
 

looneygr

New Member
Reaction score
0
Not all things, especially those that damage, can be used as a negative value.

Putting a negative value for your Fan of Knives wouldn't heal, if it does then I guess that's the only spell that does

Code:
        For each (Integer A) 1 to 8, do (Actions) 
                Loop - Actions
                        Unit Group - Pick every unit in mygroup and do (Actions)
                                Set myint = (myint + 1)
                                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
                                Set myfx[myint] = (Last created special effect)
                        Wait 1.00 seconds
                        For each (Integer A) 1 to (Number of Units in mygroup), do (Actions)
                               Special Effect - Destroy myfx[(Integer A)]

Firstly, you cannot loop with waits, inside or outside of the Loop - Actions. It seriously bugs up. Another is that your other Integer Loop, which is also A, malfunctions, if you place a loop under a loop then it should use a different integer

It heals. So what is your suggestion? I 've tried everything...! I've tried it with 2 different integers but it's not working. Really i don't know that to do :/!
I'll try to make it with 3 different triggers.
 
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