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: 145
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