Creating Skill like Batrider (Dota)'s firefly

KooH

New Member
Reaction score
1
I'm trying to create a skill like one of batrider in dota's skills called firefly.. It's pretty much like when you move, you leave a trail of flame behind you... here's my trigger.. the fire effect works okay but, it only does damage around my hero.. not the flame itself.. please help!

*Variables*
God of Fire = unit
BlazeFeetTimer = Timer
Dummy5 = Dummy that casts skill
BlazeFeetPoint = Where the damage occurs
BlazeFeetGroup = enemy units
-------------------------------------------------------------------------
(Blaze Feet Cast)
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to God of Fire - Blaze Feet
Actions
Set GodofFire = (Triggering unit)
Countdown Timer - Start BlazeFeetTimer as a One-shot timer that will expire in 10.00 seconds
Trigger - Turn on Blaze Feet Trigger <gen>
--------------------------------------------------------------------
(Blaze Feet Trigger)
Events
Time - Every 0.20 seconds of game time
Conditions
Actions
Unit - Create 1 Blaze Feet Dummy for (Owner of GodofFire) at ((Position of GodofFire) offset by 70.00 towards 270.00 degrees) facing Default building facing degrees
Set Dummy5 = (Last created unit)
Set BlazeFeetPoint = (Position of Dummy5)
Set BlazeFeetGroup = (Units within 250.00 of BlazeFeetPoint matching (((Owner of (Matching unit)) is an enemy of (Owner of GodofFire)) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of God of Fire - Blaze Feet for GodofFire) Equal to 1
(GodofFire is alive) Equal to True
(GodofFire has buff Blaze Feet ) Equal to True
Then - Actions
Unit Group - Pick every unit in BlazeFeetGroup and do (Actions)
Loop - Actions
Unit - Cause Dummy5 to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Unknown
Else - Actions
Do nothing

----------------------------------------------------------------
(Blaze Feet Stop)
Events
Time - BlazeFeetTimer expires
Conditions
Actions
Trigger - Turn off Blaze Feet Trigger <gen>


Please look at my trigger and help! thanks.
 

Grymlax

Probably not around
Reaction score
138
just give your dummy units the permanent immolition skill and you wont have to worry about the damage.
 

Carnerox

The one and only.
Reaction score
84
Here. :)

Edit* Updated the trigger, removing leaks and a few other things.

Edit Edit* If you don't want to download the map then.

Caster = Unit
TempPoint = Point
DummyUnit = Unit
TempTimer = Timer


The DummySpell was based from permanent Immolation, i just gave it 3 levels and changed the area of effect to 250, and changed the damage per second to 20/40/60.

Trigger:
  • Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Blaze Feet
    • Actions
      • -------- Setting the Caster. --------
      • Set Caster = (Triggering unit)
      • -------- Turning on the Timer. --------
      • Countdown Timer - Start TempTimer as a One-shot timer that will expire in 10.00 seconds
      • -------- Turning on the Spawn Fire trigger allowing DummyFire to be created. --------
      • Trigger - Turn on Spawn Fire &lt;gen&gt;



Trigger:
  • Spawn Fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • -------- Setting a location for the dummy units to spawn at. --------
      • Set TempPoint = ((Position of Caster) offset by 70.00 towards 270.00 degrees)
      • -------- Making sure the Caster is still alive so dummy units wont keep spawning. --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Caster is alive) Equal to (==) True
          • Then - Actions
            • -------- Creating dummy units behinde the caster. --------
            • Unit - Create 1 DummyFire for (Owner of Caster) at TempPoint facing 1.00 degrees
            • -------- Setting the dummyunit. --------
            • Set DummyUnit = (Last created unit)
            • -------- Setting the level of the DamageSpell for the dummy unit to the correct level so it deals the right damage. --------
            • Unit - Set level of BlazeFeetDamage for DummyUnit to (Level of Blaze Feet for Caster)
            • -------- Adding a 3 second duration to the dummy units so they wont stay on the map forever. --------
            • Unit - Add a 3.00 second Generic expiration timer to DummyUnit
          • Else - Actions
      • -------- Removing leaks to prevent lags. --------
      • Custom script: call RemoveLocation (udg_TempPoint)



Trigger:
  • Timer
    • Events
      • Time - TempTimer expires
    • Conditions
    • Actions
      • -------- Turning off the Spawn Fire trigger to prevent dummy units from spawning. --------
      • Trigger - Turn off Spawn Fire &lt;gen&gt;
 

Nazgul

New Member
Reaction score
1
I'm trying to recreate this spell myself so I thought I'd post here my problem, no point in making another topic since I'm using your solution. :)

Basically I'm trying to make your spell, but MUI. For some reason, the second cast only spawns 1 dummy (checked by adding a model file to it). Also, this is my first try at making a MUI spell so it has to be some newbish mistake. :p

Trigger:
  • BS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blazing Speed
    • Actions
      • Set BS_Counts = (BS_Counts + 1)
      • Set BS_Caster[BS_Counts] = (Casting unit)
      • Countdown Timer - Start BS_Timer[BS_Counts] as a One-shot timer that will expire in 10.00 seconds
      • Trigger - Turn on BS Fire trail &lt;gen&gt;


Trigger:
  • BS Fire trail
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set BS_FireStartLoc[BS_Counts] = ((Position of BS_Caster[BS_Counts]) offset by 70.00 towards 270.00 degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BS_Caster[BS_Counts] is alive) Equal to True
        • Then - Actions
          • Unit - Create 1 Dummy for (Owner of BS_Caster[BS_Counts]) at BS_FireStartLoc[BS_Counts] facing 1.00 degrees
          • Set BS_Dummy = (Last created unit)
          • Unit - Set level of Blazing Speed Trail for BS_Dummy to (Level of Blazing Speed for BS_Caster[BS_Counts])
          • Unit - Add a 3.00 second Generic expiration timer to BS_Dummy
          • Special Effect - Create a special effect attached to the origin of BS_Caster[BS_Counts] using Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_BS_FireStartLoc[udg_BS_Counts])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remaining time for BS_Timer[BS_Counts]) Equal to 0.00
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing


Also, I couldn't figure out a way to keep the special effect on the ground until the dummy unit actually dies so it doesn't do any more damage. Help with this issue would be greatly appreciated as well.

Thanks in advance. :p
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
WAit what did you do differently? And are you sure Cow's spell wasnt MUI?
 

Nazgul

New Member
Reaction score
1
Well I checked a few MUI spells and I noticed they turn variables such as X_Caster into unit arrays instead of just unit variables. Basically every variable that has to do with the spell itself is turned into an array. I don't know if this is exactly how it works, but it makes sense so that is what I did to the spell above. Like I said, this is my first attempt at a MUI spell. :p
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Well i think cow's spell is MUI it would like he tried to do that with the timer and all instead of waits.
 

Nazgul

New Member
Reaction score
1
I reset the triggers back to what cow posted and second spell cast works, but it is not MUI. Tried with 2 heroes, first Hero's spell cast stops when second Hero's spell cast starts. :(

Edit: Solved the problem with the special effect, I just gave the dummy the special effect model file. Can't believe I didn't think of that in the first place, lol.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
I think the problem is with the caster
Trigger:
  • Set Caster = (Triggering unit)

Hmm yours im not sure but it might work xD
Trigger:
  • Set BS_Counts = (BS_Counts + 1)
    • Set BS_Caster[BS_Counts] = (Casting unit)
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
cow's version is definitly not MUI, you might try this version, its pretty easy but takes custom value.
if you need custom value for any other purpose you might still add your own custom value by making a custom dummy ability with 100 levels and add it to that unit, however, here are the triggers:
Trigger:
  • Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BlazeFeet_CasterAbility
    • Actions
      • Unit Group - Add (Triggering unit) to BlazeFeet_CasterGroup
      • Unit - Set the custom value of (Triggering unit) to 0

Trigger:
  • Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BlazeFeet_CasterGroup and do (Actions)
        • Loop - Actions
          • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Custom value of (Picked unit)) Less than 100
            • Then - Actions
              • Set BlazeFeet_TmpPnt = (Position of (Picked unit))
              • Unit - Create 1 BlazeFeet_Dummy for (Owner of (Picked unit)) at BlazeFeet_TmpPnt facing Default building facing (270.0) degrees
              • Unit - Set level of BlazeFeet_DummyAbility for (Last created unit) to (Level of BlazeFeet_CasterAbility for (Picked unit))
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation (udg_BlazeFeet_TmpPnt)
            • Else - Actions
              • Unit Group - Remove (Picked unit) from BlazeFeet_CasterGroup


global variables:
BlazeFeet_CasterGroup = Unitgroup variable
BlazeFeet_TmpPnt = Point variable
 

Nazgul

New Member
Reaction score
1
I think the problem is with the caster
Trigger:
  • Set Caster = (Triggering unit)

Hmm yours im not sure but it might work xD
Trigger:
  • Set BS_Counts = (BS_Counts + 1)
    • Set BS_Caster[BS_Counts] = (Casting unit)

Tested it, didn't work. Thanks for trying though.

@Accname: Thanks for the triggers, but I have to ask since I've never messed around with them before. How will the custom value exactly affect my map? I currently have another MUI spell (taken off thehelper.net) that uses custom value. I notice you mentioned something about not being able to have 2 spells that use custom value? Or am I reading it wrong? +rep btw :)
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
every unit in wc3 has an own integer variable called its custom value.
the custom value has absolutely no use exept for triggers. it is really not more but a number assigned to every unit, by default its 0.

the custom value is used as a timer in my trigger, like a duration for the skill. every 0.10 seconds when the dummy units are created and such the custom value of the caster is increased by 1.
when the custom value reaches 100 (that means 10 seconds have passed since the skill has been used) the spell will stop and no more dummys will be spawned.

as i said you can create your own kind of custom value. create a passive ability with no icon nor effect (like tornado slow aura without effects for example) and give it 101 levels.
then add that custom ability to each unit which can use your blazeFeet ability.
now instead of increasing and checking the custom value of the caster increase the level of the passive ability and check it.
it will work perfectly fine the very same way as the custom value but the 100 ability levels will take 1 more second preloading time.
 

Nazgul

New Member
Reaction score
1
Nice, thanks a lot for the explanation and the alternative solution. The way I see it, custom value is safe as long as I don't change it during another trigger for the same unit, basically a different triggered spell used by the same hero. Thanks again, would rep ya again if I could. :)

Edit: Tested it ingame, doesn't work at all, seems like the triggers don't even run or something.

Edit2: Nevermind that, I had my IF outside the Pick Every Unit loop, :eek:. I have another question though. Seeing as there's no Turn on/off the second trigger, won't the every 0.10 seconds event lag the game eventually?
 

INCINERATE

New Member
Reaction score
12
yes it will... stay away from low timer periodics that run all game..

a couple of them are fine.. but i'd say more than 8 or 9 low timers running all game at the same time lag down the place , not that bad, but u will definately see a hit in the average frame rates over the course of the game.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Trigger:
  • Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If BlazeFeet_CasterGroup is empty
      • Then - Trigger Turn off (This trigger)
      • Else -
        • Unit Group - Pick every unit in BlazeFeet_CasterGroup and do (Actions)
          • Loop - Actions
            • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Picked unit)) Less than 100
              • Then - Actions
                • Set BlazeFeet_TmpPnt = (Position of (Picked unit))
                • Unit - Create 1 BlazeFeet_Dummy for (Owner of (Picked unit)) at BlazeFeet_TmpPnt facing Default building facing (270.0) degrees
                • Unit - Set level of BlazeFeet_DummyAbility for (Last created unit) to (Level of BlazeFeet_CasterAbility for (Picked unit))
                • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                • Custom script: call RemoveLocation (udg_BlazeFeet_TmpPnt)
              • Else - Actions
                • Unit Group - Remove (Picked unit) from BlazeFeet_CasterGroup


Simple enough ^^

Don't forget to add Turn on this trigger in the first Check Trigger at the end ^^
 

KooH

New Member
Reaction score
1
Wait! So, to use the trigger related to "custom value", You have to make a random skill that has lv 101 and give it to the caster you are using? via which ability? (hero, normal)
 

NindoOne

TH.net Regular
Reaction score
17
OK, now im not understanding. This is a bit offtopic but, what is MUI and whats the differens between that and GUI??

A MUI spell is a spell that more than one unit and player can cast at the same time, without malfunction.
A MUI spell can be written in GUI or Jass.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top