Yet another help me with a spell.

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Ok this i think won't be very hard to answer. I want to make a spell called Charging Sword Thrust. What i want is to base it off storm bolt and when the unit begins casting the ability the start charging at the target ( basically like a knockback but the casting unit will have to be "knockbacked" at the target unit of ability being cast) I had a knockback spell already and i tried messing with it ( it was copied from some user i don't remember.. i found it through search) so i tried doing something reverse so that it would knock back the casting unit but it didn't turn out too well so now I'm asking for your help :)
 

averes

New Member
Reaction score
17
You want the unit to be stunned before or after there hit with the thrust? (I'm assuming you want them stunned if your basing it on stormbolt)
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
You want the unit to be stunned before or after there hit with the thrust? (I'm assuming you want them stunned if your basing it on stormbolt)


That doesn't really matter but i'd prefer at the moment he gets hitted.
 

averes

New Member
Reaction score
17
This can really be done two ways that I can tell. The first way is using a periodic event to move the unit toward the target, which would create a 'sliding' effect. The other way would simply increase the casting heroes speed to max, give them locust and order them to move toward the unit. I'm writing an example of how to do the former of those two right now, if you'd rather the second one you'll only need to make a few minor adjustments.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
couldn't you just set storm bolt art to a unit that looks like your hero and then move unit instantly to other unit once unit is hit.... you could hide your hero until bolt hits off. dunno. worth a try?
 

averes

New Member
Reaction score
17
couldn't you just set storm bolt art to a unit that looks like your hero and then move unit instantly to other unit once unit is hit.... you could hide your hero until bolt hits off. dunno. worth a try?

This actually sounds like a far easier way of doing it. Just go with this.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
That would play the Hero's death animation.

Just change the unit variable which is slided from the Target to the Caster.
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
This actually sounds like a far easier way of doing it. Just go with this.

Yes i tried it but there is are some thing why i dont want to do it like that.

When the unit is "charging" i want to give a special effect to him. Also when i hide the unit my vision dissapears ( i know i can fix that but that just a notice ).. So basically it's mainly because i want to add a special effect when hes charging + it looks nicer :)
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
That would play the Hero's death animation.

Just change the unit variable which is slided from the Target to the Caster.

Yeah thats exactly what i did in my knockback trigger but then it just teleported the caster to the target unit of ability being cast

Also : Sorry for Double Posting.


Here is how the trigger looks

Code:
Storm Bolt Test
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to (==) Storm Bolt Test
    Actions
        Set KBBoolean = True
        Set KBAngle = (Facing of (Target unit of ability being cast))
        Set KBTarget = (Casting unit)
        Set KBDisplace = 0.00

Code:
Storm Bolt Test
    Events
        Time - Every 0.03 seconds of game time
    Conditions
        KBBoolean Equal to (==) True
    Actions
        Set KBTargetLoc = (Position of KBTarget)
        Set KBTarLocOffset = (KBTargetLoc offset by 20.00 towards KBAngle degrees)
        Unit - Move KBTarget instantly to KBTargetLoc
        Set KBDisplace = (KBDisplace + 20.00)
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (KBTarget is dead) Equal to (==) True
            Then - Actions
                Set KBBoolean = False
                Set KBTarget = No unit
            Else - Actions
                 Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        KBDisplace Greater than or equal to (>=) 300.00
                    Then - Actions
                        Set KBBoolean = False
                        Set KBTarget = No unit
                        Special Effect - Create a special effect attached to the overhead of KBTarget using Abilities\Spells\Items\ResourceItems\ResourceEffectTarget.mdl
                        Special Effect - Destroy (Last created special effect)
                    Else - Actions
                        Custom script:   call RemoveLocation(udg_KBTargetLoc)
                        Custom script:   call RemoveLocation(udg_KBTarLocOffset)

forgot to mention.. It still doesnt work.
 

Onnings

New Member
Reaction score
9
I think I have an ability somewhat like this on a map I've been working on. Let me check.

Yea, here we go. The hero ability's based off Channel, obviously; Nightstrike dummy is the dummy ability, which is based off Firebolt. Here's the trigger that dictates the ability function:

Code:
Nightstrike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Nightstrike 
    Actions
        Set Temp_Attack = (Position of (Target unit of ability being cast))
        Unit - Move (Casting unit) instantly to Temp_Attack, facing Temp_Attack
        Custom script:   call RemoveLocation (udg_Temp_Attack)
        Unit - Create 1 Dummy for Neutral Hostile at (Position of (Casting unit)) facing Default building facing degrees
        Set dummy = (Last created unit)
        Unit - Add Nightstrike dummy  to dummy
        Unit - Order dummy to Neutral - Firebolt (Target unit of ability being cast)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
I think I have an ability somewhat like this on a map I've been working on. Let me check.

Yea, here we go. The hero ability's based off Channel, obviously; Nightstrike dummy is the dummy ability, which is based off Firebolt. Here's the trigger that dictates the ability function:

Code:
Nightstrike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Nightstrike 
    Actions
        Set Temp_Attack = (Position of (Target unit of ability being cast))
        Unit - Move (Casting unit) instantly to Temp_Attack, facing Temp_Attack
        Custom script:   call RemoveLocation (udg_Temp_Attack)
        Unit - Create 1 Dummy for Neutral Hostile at (Position of (Casting unit)) facing Default building facing degrees
        Set dummy = (Last created unit)
        Unit - Add Nightstrike dummy  to dummy
        Unit - Order dummy to Neutral - Firebolt (Target unit of ability being cast)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)

as i understand that will just instantly move the unit but what i want is that it would charge ( a.k.a "knockback" the casting unit to the target unit of ability being cast facing the target unit of ability being cast )
 

vypur85

Hibernate
Reaction score
803
Have done something which suits your description. It's MPI. Try to implement it.

Code:
Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Channel 
    Actions
        Unit - Turn collision for (Triggering unit) Off
        Unit Group - Add (Triggering unit) to Unitgp_Slide
        Unit Group - Add (Target unit of ability being cast) to Unitgp_TargetUnit[(Player number of (Owner of (Triggering unit)))]
        Trigger - Turn on Periodic <gen>

Code:
Periodic
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in Unitgp_Slide and do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in Unitgp_TargetUnit[(Player number of (Owner of (Picked unit)))] and do (Actions)
                    Loop - Actions
                        Set Unit_TargetUnit = (Picked unit)
                Set Pt_TriggerPos = (Position of (Picked unit))
                Set Pt_VictimPos = (Position of Unit_TargetUnit)
                Set Pt_TargetPos = (Pt_TriggerPos offset by 10.00 towards (Angle from Pt_TriggerPos to Pt_VictimPos) degrees)
                Unit - Move (Picked unit) instantly to Pt_TargetPos
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Distance between Pt_TriggerPos and Pt_VictimPos) Less than or equal to 100.00
                                ((Picked unit) is dead) Equal to True
                                (Unit_TargetUnit is dead) Equal to True
                    Then - Actions
                        Special Effect - Create a special effect at Pt_TriggerPos using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Unit - Create 1 Footman for (Owner of (Picked unit)) at Pt_TriggerPos facing Default building facing degrees
                        Unit - Add Storm Bolt  to (Last created unit)
                        Unit - Set level of Storm Bolt  for (Last created unit) to (Level of Channel  for (Picked unit))
                        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Unit_TargetUnit
                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                        Unit - Hide (Last created unit)
                        -------- Below are necessities --------
                        Unit - Turn collision for (Picked unit) On
                        Unit Group - Remove (Picked unit) from Unitgp_Slide
                        Unit Group - Remove all units from Unitgp_TargetUnit[(Player number of (Owner of (Picked unit)))]
                    Else - Actions
                Custom script:   call RemoveLocation (udg_Pt_TriggerPos)
                Custom script:   call RemoveLocation (udg_Pt_TargetPos)
                Custom script:   call RemoveLocation (udg_Pt_VictimPos)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in Unitgp_Slide) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions
There could be bugs which I have not know off.
 

Attachments

  • Slide Stun.w3x
    19 KB · Views: 143
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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

      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