Spell Burning Steps

Steel

Software Engineer
Reaction score
109
JASS:
call TimerStart(caller,redo,true,function BurningSteps) // We start timer that will run every "redo" time and will call BurningSteps function.
  call TriggerSleepAction(Wait) // We wait "Wait" time which was defined earilier.
  
  call FlushHandleLocals(caller) // We destroy the linkage between caster and timer
  call DestroyTimer(caller)

This bit of code is well...bad. It's a very common thing among new JASSers. You shouldn't need to have to call a wait after a timer, its completely unnecessary especially in this situation. Just a minor note, TriggerSleepAction is the most inaccurate way to track time. Timer > Polled Wait > Sleep Action.

Anyway to the point, you should have a destructor (Yes this is JASS, but its the same thing) inside your timer that will clean up the trigger for you when you are finished using it, you shouldn't have to create a wait.

Hope that helps.
 
I

IKilledKEnny

Guest
I will look into that, however I did work well, at 5,10 and 15 seconds it stopped, like I wanted it, I will change it to polled wait.

> Anyway to the point, you should have a destructor

That's sounds interesting, any chance you could post / private massage me information about this?
 

Sim

Forum Administrator
Staff member
Reaction score
534
I still think the fire needs to damage longer. As it is right now, it does almost nothing. Units step on it and take no damage, unless they step on it within 2 seconds after it has been created. Looks really weird, almost as if it was a bug.

I can't approve it right now because of that.

Also, here's an example of destructor (if it's what he means):

Code:
function YOUR_SPELL_Loop takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit caster = GetHandleUnit(t, "caster")
    local integer destructor = GetHandleInt(t, "destructor")

    if destructor == *whatever integer (number of repetitions)* then
         call PauseTimer(t)
         call FlushHandleLocals(t)
         set caster = null
         call DestroyTimer(t)
         set t = null
    endif
// ACTIONS
    SetHandleInt(t, "destructor", destructor + 1)
endfunction

function YOUR_SPELL_Actions tkaes nothing returns nothing
local unit caster = GetTriggerUnit()
local timer t = CreateTimer()

SetHandleHandle(t, "caster", caster)
call StartTimer(t, 0.05, true, function YOUR_SPELL_Loop)
set caster = null
set t = null
endfunction

Should look like this. You null everything inside the timer function.
 

Steel

Software Engineer
Reaction score
109
Yea a destructor is a programming feature that returns memory that was allocated by your program. In the JASS sense it cleans up your trigger for you. And Dax you got it exactly right what I was conveying.
 
I

IKilledKEnny

Guest
Ok, that what I thought it ment, thanks Daxtreme (and steel). In my case it will be a little trickier becuase the timer time might change (redo varies from hero to hero becuase speed changes) but I will manage.

As for the fire life time, I will make it longer, and also increase the damage, but the point of the spell is to get units / creeps running on the trail, that way they could get massive damage.

Thanks for comments, I hope by tommorow or at the end of the weekend at the very worst I could get it right.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> but the point of the spell is to get units / creeps running on the trail, that way they could get massive damage.

I attacked a random spider, made sure it followed me perfectly (on the trail), and it lost about 14 hp :p

Actually, I think that hp lost was due to my attack, not the fact it was walking in the fire...
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Woah. Since when are there [noparse]
JASS:
[/noparse] tags here?

Also, you should pause your timer before detstroying it.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Vexorian said:
In special cases, a timer can continue running after DestroyTimer() is called. To fix this, simply pause the timer before it is destroyed/
Indeed; it is much safer.
 
I

IKilledKEnny

Guest
Thanks Lors.

Still waiting for it to be approved, or so I could get feedback about the spell.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Approved, but some of the configuration functions aren't constants, fix that.

EDIT: Add some things in your test map also, such as reviving the hero, press ESC to regen hp & mana...
 
I

IKilledKEnny

Guest
Ok I will fix it tommorow, thanks for approving it.

Edit: Ok I have done what you asked and much more. Now flames will be removed after 4 / 5 / 6 seconds instead of 4 / 4 / 4 seconds. Also improved description and READ ME (posted it as well for all intrested), improved a little terrain, did whatever can be constant a constant and finally add "level", "creeps", "revive" and "heal" commands to the template.
 

hawky287

New Member
Reaction score
0
excuse but i was wondering if it is easy to implement this into GUI?
i was thinking of making a trigger which makes the burning trail that illidan creates actually take damage and set the ability as a passive
i tried starting it but im a l ittle stuck

Burning Trail
Events
Unit - Illidan 0000 <gen> Acquires a target
Unit - Illidan 0000 <gen> Is issued an order with no target
Unit - Illidan 0000 <gen> Is issued an order targeting a point
Unit - Illidan 0000 <gen> Is issued an order targeting an object
Conditions
(Issued order) Equal to (Order(move))
(Level of Burning Trail for (Triggering unit)) Not equal to 0
Actions
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00 degrees

i would appreciate it if anyone could help?
tyty in advanced
 

hawky287

New Member
Reaction score
0
damn xD
using the illidan model
i was thinking of naming it frozen trail
"the trail has gone cold for those who seek me" <heroname>
the trail that <heroname> leave behind slows and does damage
=(
oh wellz
ill just probaly give up lolz
EDIT: my world editor skills need buffing ==" the ice demon's triggers were too good
i wouldnt stand i chance xD
 

Cohadar

master of fugue
Reaction score
209
This spell has a bug:
JASS:

  if NewMana &gt; 0 then // We check if the caster&#039;s new mana is more then 0 if it is then (else we do nothing):
    set FlameDummy=CreateUnit(owner,BurningStepsDummyId(),casterX,casterY,0) // This creates a flame for owner in the caster&#039;s location.
    call SetUnitState(caster,UNIT_STATE_MANA, NewMana) // This set&#039;s the caster&#039;s mana to NewMana
    call UnitAddAbility(FlameDummy,BurningStepsImmolationId()) // We add immolation to the flame
    call SetUnitAbilityLevel(FlameDummy,BurningStepsImmolationId(),AbilityLevel) // We set immolation&#039;s level to the burning step&#039;s level for the caster.
    call UnitApplyTimedLife(FlameDummy,&#039;BTLF&#039;,BurningStepsDummyTime()) // We add timed life to the flame so it will not live forever.   
  endif


should be:
JASS:

  if NewMana &gt; 0 then // We check if the caster&#039;s new mana is more then 0 if it is then (else we do nothing):
    set FlameDummy=CreateUnit(owner,BurningStepsDummyId(),casterX,casterY,0) // This creates a flame for owner in the caster&#039;s location.
    call SetUnitState(caster,UNIT_STATE_MANA, NewMana) // This set&#039;s the caster&#039;s mana to NewMana
    call UnitAddAbility(FlameDummy,BurningStepsImmolationId()) // We add immolation to the flame
    call SetUnitAbilityLevel(FlameDummy,BurningStepsImmolationId(),AbilityLevel) // We set immolation&#039;s level to the burning step&#039;s level for the caster.
    //---- this fixes a bug with leveling a perma immolation
    call SetPlayerAbilityAvailable(owner, BurningStepsImmolationId(), false)
    call SetPlayerAbilityAvailable(owner, BurningStepsImmolationId(), true)
    //----
    call UnitApplyTimedLife(FlameDummy,&#039;BTLF&#039;,BurningStepsDummyTime()) // We add timed life to the flame so it will not live forever.   
  endif


Another spell with this problem. <-------<<
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Looks cool :)
I shall test it later!

Slightly off topic:
Nice infinite loop with your links in your posts Cohadar :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top