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,464
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,464
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.

      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