Charge Skill problem

yunusowic

New Member
Reaction score
7
I made this charge skill and it works fine. But when i cast, the hero goes to this certain point in the map. It will not charge to the target but it charges to this point. And stops when it reaches that point. Here is the trigger.

Trigger:
  • Enrage Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enrage
    • Actions
      • Sound - Play BerserkerCaster <gen> at 100.00% volume, attached to (Triggering unit)
      • Unit - Create 1 Dummy of the Map for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
      • Unit - Add Enrage Stun to (Last created unit)
      • Unit - Set level of Enrage Stun for (Last created unit) to (Level of Enrage for (Triggering unit))
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Turn collision for (Triggering unit) Off
      • Unit - Pause (Triggering unit)
      • Set Real[4] = (100.00 x (Real((Level of Enrage for (Triggering unit)))))
      • Set Target[(Custom value of (Triggering unit))] = (Target unit of ability being cast)
      • Set Unit[(Custom value of (Triggering unit))] = (Triggering unit)
      • Custom script: call SetUnitAnimationByIndex( udg_Unit[GetUnitUserData(GetTriggerUnit())], 5)
      • Trigger - Turn on Enrage Damage <gen>


Trigger:
  • Enrage Damage
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to Etiket, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Unit[(Integer A)] Not equal to No unit
            • Then - Actions
              • Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
              • Custom script: call RemoveLocation (udg_TPoint[GetForLoopIndexA()])
              • Custom script: call RemoveLocation (udg_Move[GetForLoopIndexA()])
              • Set TPoint[(Integer A)] = (Position of Target[(Integer A)])
              • Set Point[(Integer A)] = (Position of Unit[(Integer A)])
              • Set EnrageAngle[(Integer A)] = (Angle from Point[(Integer A)] to TPoint[(Integer A)])
              • Set Move[(Integer A)] = (Point[(Integer A)] offset by 12.00 towards EnrageAngle[(Integer A)] degrees)
              • Destructible - Pick every destructible within 140.00 of (Position of Unit[(Integer A)]) and do (Destructible - Kill (Picked destructible))
              • Custom script: call SetUnitX(udg_Unit[GetForLoopIndexA()], GetLocationX(udg_Move[GetForLoopIndexA()]))
              • Custom script: call SetUnitY(udg_Unit[GetForLoopIndexA()], GetLocationY(udg_Move[GetForLoopIndexA()]))
              • Unit - Make Unit[(Integer A)] face EnrageAngle[(Integer A)] over 0.00 seconds
              • Unit Group - Pick every unit in (Random 1 units from (Units within 140.00 of Point[(Integer A)] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is in Damaged) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of Unit[(Integer A)])) Equal to Tru and do (Actions)
                • Loop - Actions
                  • Unit Group - Add (Picked unit) to Damaged
                  • Unit - Cause Unit[(Integer A)] to damage (Picked unit), dealing Real[4] damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
                  • Special Effect - Destroy (Last created special effect)
              • Destructible - Pick every destructible within 140.00 of (Position of Unit[(Integer A)]) and do (Destructible - Kill (Picked destructible))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between Point[(Integer A)] and TPoint[(Integer A)]) Less than or equal to 150.00
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Custom script: call RemoveLocation (udg_Move[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation (udg_Point[GetForLoopIndexA()])
                  • Custom script: call RemoveLocation (udg_TPoint[GetForLoopIndexA()])
                  • Animation - Reset Unit[(Integer A)]'s animation
                  • Unit - Remove Enrage buff from Unit[(Integer A)]
                  • Unit - Unpause Unit[(Integer A)]
                  • Unit - Turn collision for Unit[(Integer A)] On
                  • Set Unit[(Integer A)] = No unit
                  • Set Target[(Integer A)] = No unit
                  • Unit Group - Remove all units from Damaged
                • Else - Actions
            • Else - Actions
 

Cheddar

This is the way it was meant to be.
Reaction score
126
Have you tried clearing the points in your loop, even when the distance is 150 or greater?
 

simonake

New Member
Reaction score
72
Here are leaks that i found
Trigger:
  • Unit Group - Pick every unit in (Random 1 units from (Units within 140.00 of Point[(Integer A)] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is in Damaged) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of Unit[(Integer A)])) Equal to Tru and do (Actions)

and this might be another leak, im not sure...
Trigger:
  • Destructible - Pick every destructible within 140.00 of (Position of Unit[(Integer A)])


(Might be because the periodic trigger is never closed...) hehe, does it work the first time? and then not anymore?
 

yunusowic

New Member
Reaction score
7
Have you tried clearing the points in your loop, even when the distance is 150 or greater?

Yes, didn't work.

(Might be because the periodic trigger is never closed...) hehe, does it work the first time? and then not anymore?

It is closed when the distance is <= to 150. What do you mean by first time? It never works right but when the periodic trigger is first started it works right for one time. I added

Trigger:
  • Destructible - Create a Summer Tree Wall at TPoint[(Integer A)] facing (Random angle) with scale 1.00 and variation 1


action to the periodic trigger. Normally it should create many trees near the targets location but when i cast the spell it only creates 1 tree at targets location then starts creating trees at this certain point in map where the hero charges. The Target or TPoint variable is somehow changed, maybe thats the problem.
 

yunusowic

New Member
Reaction score
7
Trigger:
  • Set Target[(Custom value of (Triggering unit))] = (Target unit of ability being cast)


I moved this to top of the first triggers actions and its working.
 
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
    +2
  • 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