Help with triggered-abilities.

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
1. Say I have an ability, which basically, creates a first explosion, then a second healing explosion. However, this ability replicates itself by killing something - for example, my hero casts the spell. A footman is killed, and a copy of the spell is cast by a dummy-caster on the location of the dying footman, etc... so you could, in theory, get indefinite explosions. The detecting a dying part who was killed by the explosion is the toughest thing, though - any help?

2. Whats the best way to create a pentagram from 5 static units, around a target enemy, as a spell? (note the pentagram doesn't have to move xD). I'd assume I would make the static units, for example, a stasis ward, around the target, using fixed offsets, then somehow attach a line between each ward. However, I'm clueless on how to place the wards, then how to create lines between the wards. Note that the wards must be able to be affected by the above spell.

Note that I am not using any JASS, unless absolutely nessecary, for these abilities. +rep for anyone who can really help me!
 
for #deux(2)

there is a value for unit creation called a polar offset, use that, just make the angles and distances however you want em, this may take some experimenting.

AS for the pentagram, I would suggest a spell based off of spirit link, the animation for that also looks like something you want

in #1, does the ability ALWAYS kill the target unit? or does it just do dmg?
 
1. Say I have an ability, which basically, creates a first explosion, then a second healing explosion. However, this ability replicates itself by killing something - for example, my hero casts the spell. A footman is killed, and a copy of the spell is cast by a dummy-caster on the location of the dying footman, etc... so you could, in theory, get indefinite explosions. The detecting a dying part who was killed by the explosion is the toughest thing, though - any help?

Code:
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Some Ability
    Actions
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and do (Actions)
            Loop - Actions
                -------- // Do stuff. ie: damage --------
        Wait 0.27 game-time seconds
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within 400.00 of (Target point of ability being cast) matching ((((Matching unit) is alive) Not equal to True) and ((((Matching unit) is A ground unit) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to T and do (Actions)
            Loop - Actions
                Set Unit_Loc = (Position of (Picked unit))
                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Unit_Loc facing Default building facing degrees
                Unit - Order (Last created unit) to Do Something to (Picked unit)
                Custom script:   call RemoveLocation(udg_Unit_Loc)

It basically detects when a unit, or units die after you've casted the ability.

And you also stated that you wanted the 'first cast' to cast a healing explosion.

I would recommend casting the healing explosion at the same time as the previous.
 
polar offset leaks use a calaculater
Use sin and cos

can't you just clear those leaks farily easily?
This is theoretical BTW and for my own knowledge.
I know this will cause a lot of unit creation, but I didn't want to write down the necessary If-Then-Else statement
Code:
set Temp_Point[1] = (position of casting unit)
loop A for numbers between 0 and 360
   set Temp_Point[2] = Temp_Point[1] with polar offset of 600 and (Integer A) degrees
   create 1 (unit x) at Temp_Point[2]...
   call RemoveLocation Temp_Point[2]

would that still leak?
 
for the five units, you could give the target unit an ability based off of "create corpses" or whatever it's called, the ability the Undead Graveyard has, and change the unit's under the "gravestone" parameter to your dummy(there are little gravestones which pop up around a unit with the "create corpse" ability) and change the number spawned to 5 (although i think thats the number it has by default). as for drawing the lines between them, maybe you could give them an ability based off channel, change the follow through time to be the duration of the spell, add a lightning effect, and then (the hard part) trigger each one to cast the spell on the guy to their opposite. I've only played with create corpses a little so i don't know if this would work... come to think, the gravestones might be doodads and not units, but if it would work it'd probably be easier then screwing around with trigonometry in the trigger editor :D
 
Knocksious:
would that still leak?

All you need to do is remove "Temp_Point[1]", and, since the loop is using it, remove it 'outside' the loop:

Code:
set Temp_Point[1] = (Position of (Triggering Unit))
For each integer  A from 1 to XXX do loop actions
    Loop - Actions
        set Temp_Point[2] = Temp_Point[1] offset by 600.00 towards (some  angle)
        Unit - Create 1 (some unit) at Temp_Point[2] facing (some angle)
        Custom Script:    call RemoveLocation Temp_Point[2]
Custom Script:    call RemoveLocation Temp_Point[1]
 
Events: Unit starts effect of ability
Conditions: (Ability being cast) equal to (Your ability)
Actions: Wait until (Target unit of ability being cast) has buff (Your buff) equal to True
If - (Target unit of ability being cast) is dead equal to True
Then - Your actions
Else - Do Nothing

I think that'd be more simple for number 1.

EDIT: 200th post! Yay!
 
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

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top