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.
 
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
 
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.
 
Locals do not make it MUI. If you're takling about making it MUI in Jass, then I think you need structs.
 
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).
 
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
 
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.
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top