Skill Help

micolord

You can change this now in User CP.
Reaction score
0
I've made a skill called "Hellfire" it's more like a skill from DOTA, it suppose to do is to hit the enemy target and then burn it after 2 seconds. My problem is when you first use "Hellfire" on your target enemy/unit it will not cause any burn to the target enemy/unit you must use it 1 time first and then the second time or third or 4th time you use it, it will now work, please help me fix it so that in the first place it will affect, here is the trigger:

Trigger One:
Events
Unit - A unit Learns a skill
Conditions
((Unit-type of (Learning Hero)) Equal to Skeleton King) and ((Learned Hero Skill) Equal to Hellfire )
Actions
If (Hellfire Equal to 0) then do (Set Hellfire = 1) else do (If (Hellfire Equal to 1) then do (Set Hellfire = 2) else do (If (Hellfire Equal to 2) then do (Set Hellfire = 3) else do (If (Hellfire Equal to 3) then do (Set Hellfire = 4) else do (Do nothing))))

Trigger Two:
Events
Unit - A unit Starts the effect of an ability
Conditions
((Unit-type of (Casting unit)) Equal to Skeleton King) and ((Ability being cast) Equal to Hellfire )
Actions
If (Hellfire Equal to 1) then do (Set HellfireConfirm = True) else do (Do nothing)
If (HellfireConfirm Equal to True) then do (Unit - Cause (Casting unit) to damage circular area after 1.00 seconds of radius 1.00 at (Position of (Target unit of ability being cast)), dealing 15.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
If (HellfireConfirm Equal to True) then do (Unit - Cause (Casting unit) to damage circular area after 2.00 seconds of radius 1.00 at (Position of (Target unit of ability being cast)), dealing 15.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
If (HellfireConfirm Equal to True) then do (Set HellfireConfirm = False) else do (Do nothing)
 

Necrach

You can change this now in User CP.
Reaction score
62
Hm, first of all why do you need a condition for confirming that the hero is Skeleton King? Does anyone else have the same ability? Second, you should use Triggering Unit instead of Casting Unit. Third, you could check the Integer "Level of ability for unit" instead of setting a variable for the ability level when the skill is learned. Fourth, your positions leaks, search for a tutorial here on the forum :eek:

Now for what causes your bug, I am not sure how you are doing the with the
Trigger:
  • If (HellfireConfirm Equal to True) then do (Unit - Cause (Casting unit) to damage circular area after 1.00 seconds of radius 1.00 at (Position of (Target unit of ability being cast)), dealing 15.00 damage of attack type Spells and damage type Normal) else do (Do nothing)


EDIT: Actually, I am not sure hoe that action works, maybe someone else could say that. But I would guess that's where the problem is. You could change the trigger to use just a normal Wait action and use Damage Target instead of Damage Area, or maybe its recommended you use a timer and/or a hashtable instead of a normal wait! :p
 

micolord

You can change this now in User CP.
Reaction score
0
Nevermind! Got it fixed by adding this (Yeah pointless but it did! It worked!):

Events
Unit - A unit Learns a skill
Conditions
((Unit-type of (Learning Hero)) Equal to Skeleton King) and ((Learned Hero Skill) Equal to Hellfire )
Actions
If (Hellfire Equal to 0) then do (Set Hellfire = 1) else do (If (Hellfire Equal to 1) then do (Set Hellfire = 2) else do (If (Hellfire Equal to 2) then do (Set Hellfire = 3) else do (If (Hellfire Equal to 3) then do (Set Hellfire = 4) else do (Do nothing))))
Game - Display to (All players) the text: (String(Hellfire))
 

Necrach

You can change this now in User CP.
Reaction score
62
nevermind! Got it fixed by adding this (yeah pointless but it did! It worked!):

events
unit - a unit learns a skill
conditions
((unit-type of (learning hero)) equal to skeleton king) and ((learned hero skill) equal to hellfire )
actions
if (hellfire equal to 0) then do (set hellfire = 1) else do (if (hellfire equal to 1) then do (set hellfire = 2) else do (if (hellfire equal to 2) then do (set hellfire = 3) else do (if (hellfire equal to 3) then do (set hellfire = 4) else do (do nothing))))
game - display to (all players) the text: (string(hellfire))

:eek:
 

micolord

You can change this now in User CP.
Reaction score
0
Damn.. I only fixed when it's level 1 but when it comes to level 2 it aint fixed.. Please help me!
 

Necrach

You can change this now in User CP.
Reaction score
62
Hm, is that ability an arrow ability, like Searing Arrows? Or what's the base ability?

Anyways, you could do like this instead of your Area Damage action (although there is a lot of different sulotions). Create a dummy unit (no model, no attack, no sight range, with Locust, etc) named Hellfire Timer Dummy (or whatever ;)) So when a unit uses Hellfire, create a Hellfire Dummy Timer for the owner of casting unit, and then add a 2 second expiration timer to it, and save it linked to the target unit with a Hashtable. Then when the dummy dies, make it damage the target!

Trigger:
  • Actions
    • Set temp_point = (Position of (Triggering unit))
    • Unit - Create 1 Hellfire Timer Dummy for (Owner of (Triggering unit)) at temp_point facing Default building facing degrees
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Hashtable - Save Handle Of(Target unit of ability being cast) as (Key (Last created unit)) of 1 in hashtable
    • Custom script: call RemoveLocation (udg_temp_point)


Trigger:
  • trigger2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Cause (Triggering unit) to damage (Load (Key (Triggering unit)) of 1 in hashtable), dealing 50.00 damage of attack type Spells and damage type Normal


If you have NO idea what these triggers means, go check a tutorial of Hashtables and maybe memory leaks. For example, you need to create a hashtable before using them. Basically what this does is the dummy unit works as a 2 second timer! I AM NOT SURE I GOT WHAT YOU MEANT, THOUGH. And for different damage for different levels, you could give the dummy unit an ability with the same level as the caster's level of Hellfire, and then check that ability when the trigger should decide how much damage dealt, either through math or by if/then/else functions.

Now for the "Level of Ability for unit", you can find it whenever dealing with Integers. In Conditions, you can go down to something called Integer Comparison. After that, its Unit - Level of Ability of Unit.

EDIT: I recommend using this instead of your triggers, but it might not solve your problem. Because you are talking about some "burn" effect, is that a buff placed on the unit already on cast? If that's the case, you are doing that with the Object editor, no?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • 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
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top