[Request] Spell - Wildfire

Ensabahnur

New Member
Reaction score
4
[Trigger] Spell - Need Help

I'd like some help creating this spell in either GUI or JASS, should be MUI.

Spell: Wildfire

Description: Ignites the target in flames dealing 1 damage per second for 10 seconds. After the duration or if the target dies the spell should bounce to a random nearby enemy unit and should start the spell over again. The spell ends immediately if there are no nearby enemy units.

Level 1 - Bounces a maximum of 2 times (ignites 3 targets total)
Level 2 - Bounces a maximum of 3 times (ignites 4 targets total)
Level 3 - Bounces a maximum of 4 times (ignites 5 targets total)

Any help would be appreciated.

Trigger:
  • Wild Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to test
    • Actions
      • Wait until (((Triggering unit) has buff Parasite) Equal to False), checking every 1.00 seconds
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing (Position of (Target unit of ability being cast))
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from (Units within 700.00 of (Position of (Target unit of ability being cast))))


Basically this is what I have so far.. When you cast the spell the wait never happens, I think maybe because it happens before the target is effected by the spell? Also sometimes the dummy unit casts the spell on another target in range and sometimes it doesn't..?
 

jig7c

Stop reading me...-statement
Reaction score
123
based if of shadow strike, and then run a trigger that checks if the unit has that buff every 1 second, for 10 seconds... and then if the buff goes away, run another trigger that checks a unit within x range of that targeted unit, and then create a dummy to cast widfire on that unit!
 

jomik

New Member
Reaction score
17
based if of shadow strike, and then run a trigger that checks if the unit has that buff every 1 second, for 10 seconds... and then if the buff goes away, run another trigger that checks a unit within x range of that targeted unit, and then create a dummy to cast widfire on that unit!

Do that?
 

Ensabahnur

New Member
Reaction score
4
I tried basing it off of acid bomb but the dummy doesn't cast the spell, so I'm using parasite instead and as my first post indicates - it's not working right.
 

N(O.O)B

New Member
Reaction score
27
Alright, here's a few errors with your triggers:
Trigger:
  • Trigger
    • Events
    • Conditions
    • Actions
    • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from (Units within 700.00 of (Position of (Target unit of ability being cast))))

This targets a random unit. ANY unit. This means it targets units that are FRIENDLY to the dummy unit as well, as well as buildings, and immune units, as well as dead units (yea). When such a unit is randomly targeted, it will try to cast parasite, but (you guessed it), it can't parasite a friendly unit/building/immune/dead unit. You will have to add checks to it. Not to mention that this leaks. Do this:
Trigger:
  • Trigger
    • Events
    • Conditions
    • Actions
    • Set Point = (Position of (Target unit of ability being cast))
    • Set UnitGroup = (Units within 700.00 of (Point) Matching (Unit Belongs to an Enemy of (Owner of (Triggering Unit)) and (Unit Is (A Structure) Equal To False) and (Unit Is (Magic Immune) Equal To False) and (((Triggering unit) is alive) equal to True))
    • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from UnitGroup)
    • Custom script: call RemoveLocation(udg_Point)
    • Custom script: call DestroyGroup(udg_UnitGroup)


Now, your trigger has a "Wait" in it, after which you are using "Target Unit of Ability Being Cast", this could bug. Instead, do this:
Trigger:
  • Wild Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to test
    • Actions
      • Custom script: local unit a = GetSpellTargetUnit
      • Wait until (((Triggering unit) has buff Parasite) Equal to True), checking every 0.10 seconds
      • Wait until (((Triggering unit) has buff Parasite) Equal to False), checking every 0.10 seconds
      • Custom script: set udg_TempUnit = a
      • Set Point = (Position of (TempUnit))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at Point facing Point)
      • Set UnitGroup = (Units within 700.00 of Point Matching (Unit Belongs to an Enemy of (Owner of (Triggering Unit)) and (Unit Is (A Structure) Equal To False) and (Unit Is (Magic Immune) Equal To False) and (((Triggering unit) is alive) equal to True))
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from UnitGroup)))
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: set a = null

The dummy will stay around as well, so you will have to add an expiration timer to it.
Trigger:
  • Wild Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to test
    • Actions
      • Custom script: local unit a = GetSpellTargetUnit
      • Wait until (((Triggering unit) has buff Parasite) Equal to True), checking every 0.10 seconds
      • Wait until (((Triggering unit) has buff Parasite) Equal to False), checking every 0.10 seconds
      • Custom script: set udg_TempUnit = a
      • Set Point = (Position of (TempUnit))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at Point facing Point)
      • Set UnitGroup = (Units within 700.00 of Point Matching (Unit Belongs to an Enemy of (Owner of (Triggering Unit)) and (Unit Is (A Structure) Equal To False) and (Unit Is (Magic Immune) Equal To False) and (((Triggering unit) is alive) equal to True))
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from UnitGroup)))
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: set a = null

If you still can't get it to work, I'll do it for you, but try first ;)
 

Bogrim

y hello thar
Reaction score
154
A much easier way to make this trigger would be to just pick up on the parasite unit's death (since you can't detect the summon), and then pick a random enemy unit in range of the dying unit and cast a new parasite spell.

This way you can rank the bounces by using different unit types without really having to trigger anything. I choose to use a local variable in this example though:
Trigger:
  • Ability Wildfire
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (1 Bounce)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (2 Bounces)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (3 Bounces)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (4 Bounces)
    • Actions
      • Custom script: local unit u
      • Set temp_location = (Position of (Dying unit))
      • Set temp_group = (Units within 700.00 of temp_location matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Wildfire ) Equal to False))))
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at temp_location facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from temp_group)
      • Custom script: set u = GetLastCreatedUnit()
      • Custom script: call RemoveLocation( udg_temp_location )
      • Wait 2.00 seconds
      • Custom script: call RemoveUnit( u )
      • Custom script: set u = null
 

Ensabahnur

New Member
Reaction score
4
Trigger:
  • Wild Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to test
    • Actions
      • Custom script: local unit a = GetSpellTargetUnit
      • Wait until (((Triggering unit) has buff Parasite) Equal to True), checking every 0.10 seconds
      • Wait until (((Triggering unit) has buff Parasite) Equal to False), checking every 0.10 seconds
      • Custom script: set udg_TempUnit = a
      • Set Point = (Position of TempUnit)
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at Point facing Point
      • Set UnitGroup = (Units within 700.00 of Point matching ((((Triggering unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Triggering unit) is Mechanical) Equal to False) and ((((Triggering unit) is Magic Immune) Equal to False) and (((Triggering
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from UnitGroup)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: set a = null


Ok this is making more sense now.. I did this ^^ however it doesn't compile I get a Undeclared variable GetSpellTargetUnit error...?

Also did I do this part correct or am I missing another variable?
Trigger:
  • Set UnitGroup = (Units within 700.00 of Point matching ((((Triggering unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Triggering unit) is Mechanical) Equal to False) and ((((Triggering unit) is Magic Immune) Equal to False) and (((Triggering
    • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from UnitGroup)
 

madd_999

New Member
Reaction score
14
the problem with with your very first trigger where:
Trigger:
  • Actions
    • Wait until (((Triggering unit) has buff Parasite) Equal to False), checking every 1.00 seconds


and having:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability


the triggering unit from which he checks the buff is the unit starting the effect.. the caster.. and your description says it is targeted on an enemy unit.. so there is no wait ever.. because the unit doesn't get the buff in the first place..

instead of having triggering unit you should have used:
Trigger:
  • Actions
    • Wait until (((Target unit of ability being cast) has buff Parasite) Equal to False), checking every 1.00 seconds


the second problem with your fist trigger would have been to pick a random unit in a 700 range (which includes allies and invulnerable units) but the solution to that problem has already been given..
 

kingkwong92

Well-Known Member
Reaction score
25
The hashtables leak so you will have to clear that up.
Hope this works for you.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set wf_HT = (Last created hashtable)


Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Strike
    • Actions
      • Hashtable - Save ((Level of Shadow Strike for (Triggering unit)) + 2) as 0 of (Key (Target unit of ability being cast)) in wf_HT
      • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Target unit of ability being cast)) in (Last created hashtable)


Trigger:
  • Untitled Trigger 004
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Shadow Strike) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 0 of (Key (Triggering unit)) from wf_HT) Greater than 0
        • Then - Actions
          • Set wf_point = (Position of (Load 1 of (Key (Triggering unit)) in wf_HT))
          • Set wf_group = (Units within 400.00 of wf_point matching (((Matching unit) belongs to an enemy of (Owner of (Load 1 of (Key (Triggering unit)) in wf_HT))) Equal to True))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in wf_group) Greater than 0
            • Then - Actions
              • Hashtable - Save ((Load 0 of (Key (Triggering unit)) from wf_HT) - 1) as 0 of (Key (Random unit from wf_group)) in wf_HT
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_wf_point)
      • Custom script: call DestroyGroup(udg_wf_group)
 

N(O.O)B

New Member
Reaction score
27
The hashtables leak so you will have to clear that up.
Hope this works for you.

Trigger:
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set wf_HT = (Last created hashtable)


Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Strike
    • Actions
      • Hashtable - Save ((Level of Shadow Strike for (Triggering unit)) + 2) as 0 of (Key (Target unit of ability being cast)) in wf_HT
      • Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Target unit of ability being cast)) in (Last created hashtable)


Trigger:
  • Untitled Trigger 004
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) has buff Shadow Strike) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 0 of (Key (Triggering unit)) from wf_HT) Greater than 0
        • Then - Actions
          • Set wf_point = (Position of (Load 1 of (Key (Triggering unit)) in wf_HT))
          • Set wf_group = (Units within 400.00 of wf_point matching (((Matching unit) belongs to an enemy of (Owner of (Load 1 of (Key (Triggering unit)) in wf_HT))) Equal to True))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in wf_group) Greater than 0
            • Then - Actions
              • Hashtable - Save ((Load 0 of (Key (Triggering unit)) from wf_HT) - 1) as 0 of (Key (Random unit from wf_group)) in wf_HT
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_wf_point)
      • Custom script: call DestroyGroup(udg_wf_group)

This won't work, the reason for it is that you are checking if a Dead unit has a buff. Upon death, all of the buffs are removed from the unit before the "A Unit Dies" event is triggered, meaning the third trigger will never happen.

That's because you need to write "GetSpellTargetUnit()". ;-)
This. Terribly sorry, didn't test the trigger before posting it :banghead:, just put () after it and it should work ;)
 

kingkwong92

Well-Known Member
Reaction score
25
I think it is MUI but I have been wrong.
Hashtables basically make everything MUI (if they are used correctly)
That's my simple rule
 

Bogrim

y hello thar
Reaction score
154
Thanks for your help. Is this MUI or no? I'm not sure how I would make it MUI..
The trigger I posted is MUI and completely function. Try the test map and see. There's really no reason to tinker with hashtables for this spell.
 

N(O.O)B

New Member
Reaction score
27
I thought waits make it not MUI?

This is only true if you store values in global variables before the wait, and use them after the wait. Using (Triggering Unit) after a wait will not change whether the spell is MUI or not, neither will using local variables. The real question is, why did Bogrim use a local variable when you might as well just add an expiration timer to the unit for the same effect? :nuts:
 

jomik

New Member
Reaction score
17
A much easier way to make this trigger would be to just pick up on the parasite unit's death (since you can't detect the summon), and then pick a random enemy unit in range of the dying unit and cast a new parasite spell.

This way you can rank the bounces by using different unit types without really having to trigger anything. I choose to use a local variable in this example though:
Trigger:
  • Ability Wildfire
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (1 Bounce)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (2 Bounces)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (3 Bounces)
          • (Unit-type of (Dying unit)) Equal to Wildfire Dummy (4 Bounces)
    • Actions
      • Custom script: local unit u
      • Set temp_location = (Position of (Dying unit))
      • Set temp_group = (Units within 700.00 of temp_location matching ((((Matching unit) belongs to an enemy of (Owner of (Dying unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Wildfire ) Equal to False))))
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at temp_location facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral - Parasite (Random unit from temp_group)
      • Custom script: set u = GetLastCreatedUnit()
      • Custom script: call RemoveLocation( udg_temp_location )
      • Wait 2.00 seconds
      • Custom script: call RemoveUnit( u )

May I ask what you use the local variable "u" for? you set it and wait 2 seconds, then remove it? :O
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • 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

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top