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!
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
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?
 

Tinki3

Special Member
Reaction score
418
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.
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
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?
 
O

oldmanwinter

Guest
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
 

Tinki3

Special Member
Reaction score
418
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]
 

Cheddar

This is the way it was meant to be.
Reaction score
126
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.
  • 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 The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    Sticking with the desserts for now the latest recipe is Fried Apple Pies - https://www.thehelper.net/threads/recipe-fried-apple-pies.194297/
  • The Helper The Helper:
    Finally finding about some of the bots that are flooding the users online - bytespider apparently is a huge offender here - ignores robots.txt and comes in from a ton of different IPs

      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