• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

change attack type of abilities?

Status
Not open for further replies.

311

311

Level 4
Joined
May 12, 2019
Messages
73
Is there a way to make abilities do normal (or any other type) of damage instead of always spell damage?

For example I want Bladestorm to deal Hero or normal damage, as I want it to be effected by armor.


Also is there a way to find a units base damage? I assume no from the searching I have done, without using the damage detection system (as I don't understand it and wouldn't know how to implement it into my map) I did try though :p.

I did find one trigger that almost works for finding my damage as when I use books of intellect and stuff, the base damage goes up which is good, however for whatever reason if I had claws of attack, it doesn't that, so it kind of ruins it :(.
 
Level 9
Joined
Mar 26, 2017
Messages
376
1.
It cannot be set in object editor, but there are 2 possible workarounds;

-Create a custom ability based on channel that mimicks Bladestorm, giving magic immunity and disabling other attacks/abilities. Then add a loop timer that deals normal damage in an area around the casting unit's position.
-Add a trigger on 'UNIT_DAMAGED' with the condition being the Damage Source is a unit that is currently using Bladestorm (which can be tracked by variables). Then change event damage into the desired Damage type.

2.
Indeed you can only find the base damage + bonus damage derived from stats. Not item damage such as claws.
The only way to find a unit's damage including bonus from items is to register its damage when it is attacking another unit. This can be done in a 'UNIT_DAMAGED' event, although the result will also include damage from dice rolls.
 
Level 8
Joined
Jun 13, 2008
Messages
345
If you don't wanna get drown in many technical stuff, then just learn to use Bribe's spell system (especially if you wanna use multiple custom spells in your map). It should be very easy to re-create a spell like bladestorm and you will also guarantee that it won't leak, it will have the best performance possible and be MUI.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
1.
It cannot be set in object editor, but there are 2 possible workarounds;

-Create a custom ability based on channel that mimicks Bladestorm, giving magic immunity and disabling other attacks/abilities. Then add a loop timer that deals normal damage in an area around the casting unit's position.
-Add a trigger on 'UNIT_DAMAGED' with the condition being the Damage Source is a unit that is currently using Bladestorm (which can be tracked by variables). Then change event damage into the desired Damage type.

2.
Indeed you can only find the base damage + bonus damage derived from stats. Not item damage such as claws.
The only way to find a unit's damage including bonus from items is to register its damage when it is attacking another unit. This can be done in a 'UNIT_DAMAGED' event, although the result will also include damage from dice rolls.

Where do I get unit damaged event? Under events the closest I see is "unit is attacked" If I do specific unit event, I can find "takes damage" but I don't see how I could use that as its an RPG type map where I am going to be killing 100s of different units.
I am ok with the including dice rolls as I plan on making it no dice anyway, as I never understood how to get a min-max damage to what I want with dice rolls, so I just make a char always do 50-50 dmg for example.


As far as bribes spell system I did just DL that, but ya that is like way to complicated for me lol, I couldn't even almost figure it out.
 
Level 9
Joined
Mar 26, 2017
Messages
376
In GUI there is only a EVENT_UNIT_DAMAGED which is not what you want, as it fired after armor is taken into account for damage calculation.

The only way to use a damage event is a Custom Script with EVENT_PLAYER_UNIT_DAMAGING (firing before armor modification) as explained by Bribe in his topic about the Damage System.

If you'd rather not use custom script, you're going to have to learn how to use DDS.

Otherwise you could still create a custom ability that mimicks Bladestorm and deals the desired damage type. This solution would also be least performance intensive.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
K ill try to open Bribes damage system again, and see if I can find a way to understand it
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
Nope no luck :(. I did however forget that Bladestorm makes you magic immune, which I don't want no matter what. So what I tried to do now is base my spell off immolate, then trigger the damage that way its not magic. however I cant get the Bladestorm animation to play, and I am not sure why. I added attack walk stand spin to animation names on the Immolation spell but that does nothing at all :(. The fields for effect/caster none have bladestorm as an option, I did put bladestorm in the buffs section (also does nothing)
I tried to add the animation in triggers by having it add "attack walk stand spin" this will technically work, however if I move the animation stops, if I stop it does come back, but I would of course need it to stay on.

dmg
Events
Time - Every 0.40 seconds of game time
Conditions
Actions
Animation - Play Blademaster 0001 <gen>'s attack walk stand spin animation
Unit - Cause bladestormcaster to damage circular area after 0.00 seconds of radius 300.00 at (Position of bladestormcaster), dealing 50.00 damage of attack type Hero and damage type Normal

Thats what I have for the damage, trigger which turns on when turning on immolate.

Also I would need to make sure I cant attack during bladestorm
 
Level 9
Joined
Mar 26, 2017
Messages
376
Immolate is a toggle ability whereas Bladestorm has a fixed duration, if that is what you want.
If the magic immunity is not such a big issue, you might just base your ability off Bladestorm itself and change damage to 0.

Otherwise, you might put a trigger on the Bladestorming unit that is active as long as Bladestorm is active, and each time the unit is issued an order, an animation effect is applied to the unit.
(you might want to put a 0.01 second wait time there, as I'm not 100% sure if the animation may be cancelled if it follows the order immediately)

As for disabling attack, you may have a dummy unit that casts silence on your unit for the duration of Bladestorm. For this silence ability, set 'Attacks Prevented' accordingly.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
Immolate is a toggle ability whereas Bladestorm has a fixed duration, if that is what you want.
If the magic immunity is not such a big issue, you might just base your ability off Bladestorm itself and change damage to 0.

Otherwise, you might put a trigger on the Bladestorming unit that is active as long as Bladestorm is active, and each time the unit is issued an order, an animation effect is applied to the unit.
(you might want to put a 0.01 second wait time there, as I'm not 100% sure if the animation may be cancelled if it follows the order immediately)

As for disabling attack, you may have a dummy unit that casts silence on your unit for the duration of Bladestorm. For this silence ability, set 'Attacks Prevented' accordingly.

ya I really dont want magic immunity no matter what, I tried adding a trigger during bladestorm removing magic immunity classification but that don't work.
as far as the bladestorm effect during immolation I tried that even with doing it every .2 seconds, but if you click move it stops :(
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
What you can do is create a new ability based on Channel or maybe an Instant ability like Berserk.

Then create a trigger that runs when A unit starts the effect of an ability with the Condition Ability being cast equal to our new ability.

In the Actions for this trigger you want to set your heroes transparency to 0%. This will make the Hero's model "invisible". Then create a Dummy unit (or a Special Effect) using the model of the Blademaster and have this Dummy/Sfx play the Spin animation.

Then turn on a Timer, one that runs every 0.01 seconds would give you the best results.

In the Timer trigger (Using the Event Timer has expired) you will use SetUnitX/Y or Set Special Effect Position to constantly position the Dummy/Sfx on top of your Hero. Using this method won't interrupt the Spin animation.
SetUnitX / Y problem
The Wonderful World of Special effect Modifications!

If you wish to prevent your Hero from casting spells/attacking while spinning, you can disable it's abilities with the Disable Ability action and add the Orc Burrow (Cargo Hold) ability to it for a disarming effect. You could also have a Dummy cast Drunken Haze on your Hero that is modified to disable attacking/spell casting (this could be dispelled though so I don't like this option).

After X seconds, or if the Hero dies, turn off the Timer, destroy the dummy/sfx (hide them first as to prevent the death animation), and reset anything else that was changed.
 
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
In Damage Engine it's as simple as:

  • Bladestorm as Physical
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • Unit Type of DamageEventSource Equal to Blademaster
    • Actions
      • Set DamageEventAttackT = ATTACK_TYPE_HERO
      • Set DamageEventDamageT = DAMAGE_TYPE_NORMAL


you are my hero this worked :)
your damage system isn't going to have a way to remove the magic immunity though right?
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
you are my hero this worked :)
your damage system isn't going to have a way to remove the magic immunity though right?
You can try this but it isn't tested so I can't be sure:

  • Remove Invulnerability
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestorm
    • Actions
      • Unit - Make (Triggering unit) vulnerable
You can add a "Wait" if the above doesn't work (just to test it).
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
You can try this but it isn't tested so I can't be sure:

  • Remove Invulnerability
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestorm
    • Actions
      • Unit - Make (Triggering unit) vulnerable
You can add a "Wait" if the above doesn't work (just to test it).


nope didn't work :(, even removing magic immunity classification dont work during this time :(
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
nope didn't work :(, even removing magic immunity classification dont work during this time :(

Well that sucks. Like the others said it's possible to get away with "hiding" the Blademaster if you want to base the ability off of immolation. You can then use a Special Effect and animate it with the Bladestorm animation and set its position to that of the Blademaster's every 0.03 seconds.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
Well that sucks. Like the others said it's possible to get away with "hiding" the Blademaster if you want to base the ability off of immolation. You can then use a Special Effect and animate it with the Bladestorm animation and set its position to that of the Blademaster's every 0.03 seconds.


I thought I had a good work around, was just going to make all abilities either do normal damage or "what I call magic damage" then for items/skills in my games I would just do triggers to give magic resist to similate the "magic damage" in my map

That way I can use the damage engine to just do damage x80% for example if somebody has 80% magic resist. That way it can be similar to an RPG, where I have my physical damage, and "magic damage" like I want. My bladestorm even though "magic immune" working perfectly fine and look normal (that immolation no matter what, never looked good) and I can make all abilities require level 6 that way they are target-able and work :) however I ran into one issue, aoe spells, like flamestrike/blizzard, I am not sure why, but they will NOT damage the Blademaster during magic immune no matter what.

I tested stormbolt/shadowstrike/Bladestorm all these I can get to hurt the Blademaster when he is doing his bladestorm so this is good as I don't want magic immunity
I got all these to work just by making them do hero damage with damage system... then making them req level 6 so I can target them(otherwise I still get the immune message)

Even though Bladestorm is an aoe spell, and works fine when want it to damage another Blademaster,(Which is good this is want I want)
I don't get why Flamestrike/blizzard don't work
I know blizzard/flamestrike are technically doing hero damage, as when my magic immunity falls off I die instantly (I made hero damage do 10000x damage just for testing purposes to make it easy to see if trigger worked)
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
sure, it would help a lot
where he isn't able to attack / cast other spells? and Actually look likes hes spinning(Even when moving)

also stuns stop him(and the animation) as I feel like with the immolation just so many things went wrong with it :(
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
sure, it would help a lot
where he isn't able to attack / cast other spells? and Actually look likes hes spinning(Even when moving)

also stuns stop him(and the animation) as I feel like with the immolation just so many things went wrong with it :(
Is this spell intended to work for multiple units at the same time? It makes it a lot easier if it's only for a single unit.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
Is this spell intended to work for multiple units at the same time? It makes it a lot easier if it's only for a single unit.

umm I rather have it have multiple.
As I planned to be able to pick the same class as other people, so the most would be 4 units though.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
Uncle if you want to make it work with just 1 unit I will interpolate it to work with Unit Indexer so that we're splitting the workload.
I was going to use your Unit Indexer but then he said there would be a maximum of 1 "Bladestormer" per player so I figured I'd go the Player Number approach. I'm sort of regretting it now as I could've easily done so and made it MUI.

But thanks for the offer, and feel free to rip this apart or tell me how it could be improved.

This became a bit more advanced than I thought it would, I hope OP is using the latest patch...
  • Cast Bladestorm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestorm (Custom)
    • Actions
      • Set VariableSet PN = (Player number of (Triggering player))
      • Set VariableSet Bladestorm_Unit[PN] = (Triggering unit)
      • Set VariableSet Bladestorm_Point = (Position of (Triggering unit))
      • -------- --------
      • -------- Set the Duration/Damage Interval/Damage Amount/AoE --------
      • -------- 1 = 0.01 seconds (So a Duration of 500 = 5.00 second duration and an Interval of 20 = 0.20 second damage intervals) --------
      • Set VariableSet Bladestorm_Duration[PN] = 500
      • Set VariableSet Bladestorm_Interval[PN] = 20
      • Set VariableSet Bladestorm_Damage[PN] = 20.00
      • Set VariableSet Bladestorm_AoE[PN] = 250.00
      • -------- --------
      • -------- Create the Bladestorm Special Effect --------
      • Special Effect - Create a special effect at Bladestorm_Point using units\orc\HeroBladeMaster\HeroBladeMaster.mdl
      • Set VariableSet Bladestorm_Sfx[PN] = (Last created special effect)
      • Special Effect - For Special Effect: Bladestorm_Sfx[PN], Add Sub-Animation: Spin
      • Special Effect - Play Special Effect: Bladestorm_Sfx[PN], Animation: Attack
      • Custom script: call RemoveLocation (udg_Bladestorm_Point)
      • -------- --------
      • -------- Disarm/Make Hero Transparent --------
      • Unit - Add Cargo Hold (Orc Burrow) to Bladestorm_Unit[PN]
      • Animation - Change Bladestorm_Unit[PN]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
      • -------- --------
      • -------- Disable other Abilities --------
      • Unit - For Bladestorm_Unit[PN], Ability Wind Walk, Disable ability: True, Hide UI: False
      • Unit - For Bladestorm_Unit[PN], Ability Mirror Image, Disable ability: True, Hide UI: False
      • -------- --------
      • -------- Start the Timer --------
      • Countdown Timer - Start Bladestorm_Timer[PN] as a Repeating timer that will expire in 0.01 seconds
The Timers need to have their Array Size set to 4! This needs to be done in the Variable Editor (Control + B).
  • Bladestorm Timer
    • Events
      • Time - Bladestorm_Timer[1] expires
      • Time - Bladestorm_Timer[2] expires
      • Time - Bladestorm_Timer[3] expires
      • Time - Bladestorm_Timer[4] expires
    • Conditions
    • Actions
      • Custom script: local integer i = 1
      • -------- This loops from 1 to 4, finding which player's Timer has Expired --------
      • Custom script: loop
      • Custom script: exitwhen i > 4
      • Custom script: if GetExpiredTimer() == udg_Bladestorm_Timer[i] then
      • Custom script: set udg_PN = i
      • Custom script: endif
      • Custom script: set i = i + 1
      • Custom script: endloop
      • -------- --------
      • -------- Reduce the Duration (Once it reaches 0 it's finished) --------
      • Set VariableSet Bladestorm_Duration[PN] = (Bladestorm_Duration[PN] - 1)
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Bladestorm_Unit[PN] is alive) Equal to True
          • (Bladestorm_Unit[PN] is hidden) Equal to False
        • Then - Actions
          • -------- Set the position of the Bladestorm Special Effect --------
          • Custom script: set udg_Bladestorm_X = GetUnitX(udg_Bladestorm_Unit[udg_PN])
          • Custom script: set udg_Bladestorm_Y = GetUnitY(udg_Bladestorm_Unit[udg_PN])
          • Special Effect - Set Position - X of Bladestorm_Sfx[PN] to Bladestorm_X
          • Special Effect - Set Position - Y of Bladestorm_Sfx[PN] to Bladestorm_Y
          • -------- --------
          • -------- Check if Damage Interval has fired --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Bladestorm_Duration[PN] mod Bladestorm_Interval[PN]) Equal to 0
            • Then - Actions
              • -------- Deal damage to nearby enemies --------
              • Set VariableSet Bladestorm_Point = (Position of Bladestorm_Unit[PN])
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within Bladestorm_AoE[PN] of Bladestorm_Point.) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) is A ground unit) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is hidden) Equal to False
                      • ((Picked unit) belongs to an enemy of (Owner of Bladestorm_Unit[PN]).) Equal to True
                    • Then - Actions
                      • Unit - Cause Bladestorm_Unit[PN] to damage (Picked unit), dealing Bladestorm_Damage[PN] damage of attack type Hero and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
              • Custom script: call RemoveLocation (udg_Bladestorm_Point)
              • -------- --------
              • -------- Check if the Duration is over --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Bladestorm_Duration[PN] Less than or equal to 0
                • Then - Actions
                  • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
                • Else - Actions
            • Else - Actions
        • Else - Actions
          • -------- End the effect prematurely since the Unit is dead or hidden --------
          • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
Whenever a unit becomes Stunned it issues this order. You need to use Custom Script to catch it in GUI.
  • Bladestorm Stunned
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Triggering unit) Equal to Bladestorm_Unit[(Player number of (Triggering player))]
    • Actions
      • -------- This order is issued whenever a unit becomes stunned --------
      • Custom script: if GetIssuedOrderId() == 851973 then
      • -------- --------
      • Set VariableSet PN = (Player number of (Triggering player))
      • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
      • -------- --------
      • Custom script: endif
It helped keep things organized and neat by having this be it's own trigger. I run these Actions when one of the many situations occur (Unit dies, Unit becomes hidden, Bladestorm finishes, Unit becomes stunned, etc...).
  • Bladestorm Finish
    • Events
    • Conditions
    • Actions
      • -------- Set Bladestorm_Point to somewhere in the boundaries along the edge of the map (so you don't see/hear the Blademaster Sfx die) --------
      • Set VariableSet Bladestorm_Point = ((Center of (Playable map area)) offset by (-6000.00, 0.00))
      • Special Effect - Set Position of Bladestorm_Sfx[PN] to Bladestorm_Point
      • Special Effect - Destroy Bladestorm_Sfx[PN]
      • Custom script: call RemoveLocation (udg_Bladestorm_Point)
      • -------- --------
      • -------- Undisarm/Reset Transparency --------
      • Unit - Remove Cargo Hold (Orc Burrow) from Bladestorm_Unit[PN]
      • Animation - Change Bladestorm_Unit[PN]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • -------- --------
      • -------- Enable other Abilities --------
      • Unit - For Bladestorm_Unit[PN], Ability Wind Walk, Disable ability: False, Hide UI: False
      • Unit - For Bladestorm_Unit[PN], Ability Mirror Image, Disable ability: False, Hide UI: False
      • -------- --------
      • -------- Do this after you're done referencing Bladestorm_Unit[PN] --------
      • Set VariableSet Bladestorm_Unit[PN] = No unit
      • -------- --------
      • Countdown Timer - Pause Bladestorm_Timer[PN]
 

Attachments

  • Bladestorm Example.w3m
    25 KB · Views: 31
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
Is this spell intended to work for multiple units at the same time? It makes it a lot easier if it's only for a single unit.

Still trying to find a way to make flamestrike/blizzard skills like that effect the magic immune characters. Not sure why some skills wont effect him. As I can use Bribes damage system to make shadowstrike target the magic immune BM and do damage, Stormbolt also works, even another BM spinning with bladestorm I can make that do damage to the blademaster simply just making it so the damage is normal instead of magic with any of these skills, but some aoe skills for whatever reason seem to not be able to be changed, not sure if its something that just is hard coded and cant ever be changed, or hopefully in next damage system update it will allow it.
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
going to try your map btw, I didn't notice you added this, wasn't showing anything new until I posted. Thanks :)
I am using latest patch though yes :)
 

311

311

Level 4
Joined
May 12, 2019
Messages
73
I was going to use your Unit Indexer but then he said there would be a maximum of 1 "Bladestormer" per player so I figured I'd go the Player Number approach. I'm sort of regretting it now as I could've easily done so and made it MUI.

But thanks for the offer, and feel free to rip this apart or tell me how it could be improved.

This became a bit more advanced than I thought it would, I hope OP is using the latest patch...
  • Cast Bladestorm
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bladestorm (Custom)
    • Actions
      • Set VariableSet PN = (Player number of (Triggering player))
      • Set VariableSet Bladestorm_Unit[PN] = (Triggering unit)
      • Set VariableSet Bladestorm_Point = (Position of (Triggering unit))
      • -------- --------
      • -------- Set the Duration/Damage Interval/Damage Amount/AoE --------
      • -------- 1 = 0.01 seconds (So a Duration of 500 = 5.00 second duration and an Interval of 20 = 0.20 second damage intervals) --------
      • Set VariableSet Bladestorm_Duration[PN] = 500
      • Set VariableSet Bladestorm_Interval[PN] = 20
      • Set VariableSet Bladestorm_Damage[PN] = 20.00
      • Set VariableSet Bladestorm_AoE[PN] = 250.00
      • -------- --------
      • -------- Create the Bladestorm Special Effect --------
      • Special Effect - Create a special effect at Bladestorm_Point using units\orc\HeroBladeMaster\HeroBladeMaster.mdl
      • Set VariableSet Bladestorm_Sfx[PN] = (Last created special effect)
      • Special Effect - For Special Effect: Bladestorm_Sfx[PN], Add Sub-Animation: Spin
      • Special Effect - Play Special Effect: Bladestorm_Sfx[PN], Animation: Attack
      • Custom script: call RemoveLocation (udg_Bladestorm_Point)
      • -------- --------
      • -------- Disarm/Make Hero Transparent --------
      • Unit - Add Cargo Hold (Orc Burrow) to Bladestorm_Unit[PN]
      • Animation - Change Bladestorm_Unit[PN]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
      • -------- --------
      • -------- Disable other Abilities --------
      • Unit - For Bladestorm_Unit[PN], Ability Wind Walk, Disable ability: True, Hide UI: False
      • Unit - For Bladestorm_Unit[PN], Ability Mirror Image, Disable ability: True, Hide UI: False
      • -------- --------
      • -------- Start the Timer --------
      • Countdown Timer - Start Bladestorm_Timer[PN] as a Repeating timer that will expire in 0.01 seconds
The Timers need to have their Array Size set to 4! This needs to be done in the Variable Editor (Control + B).
  • Bladestorm Timer
    • Events
      • Time - Bladestorm_Timer[1] expires
      • Time - Bladestorm_Timer[2] expires
      • Time - Bladestorm_Timer[3] expires
      • Time - Bladestorm_Timer[4] expires
    • Conditions
    • Actions
      • Custom script: local integer i = 1
      • -------- This loops from 1 to 4, finding which player's Timer has Expired --------
      • Custom script: loop
      • Custom script: exitwhen i > 4
      • Custom script: if GetExpiredTimer() == udg_Bladestorm_Timer[i] then
      • Custom script: set udg_PN = i
      • Custom script: endif
      • Custom script: set i = i + 1
      • Custom script: endloop
      • -------- --------
      • -------- Reduce the Duration (Once it reaches 0 it's finished) --------
      • Set VariableSet Bladestorm_Duration[PN] = (Bladestorm_Duration[PN] - 1)
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Bladestorm_Unit[PN] is alive) Equal to True
          • (Bladestorm_Unit[PN] is hidden) Equal to False
        • Then - Actions
          • -------- Set the position of the Bladestorm Special Effect --------
          • Custom script: set udg_Bladestorm_X = GetUnitX(udg_Bladestorm_Unit[udg_PN])
          • Custom script: set udg_Bladestorm_Y = GetUnitY(udg_Bladestorm_Unit[udg_PN])
          • Special Effect - Set Position - X of Bladestorm_Sfx[PN] to Bladestorm_X
          • Special Effect - Set Position - Y of Bladestorm_Sfx[PN] to Bladestorm_Y
          • -------- --------
          • -------- Check if Damage Interval has fired --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Bladestorm_Duration[PN] mod Bladestorm_Interval[PN]) Equal to 0
            • Then - Actions
              • -------- Deal damage to nearby enemies --------
              • Set VariableSet Bladestorm_Point = (Position of Bladestorm_Unit[PN])
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within Bladestorm_AoE[PN] of Bladestorm_Point.) and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) is A ground unit) Equal to True
                      • ((Picked unit) is A structure) Equal to False
                      • ((Picked unit) is hidden) Equal to False
                      • ((Picked unit) belongs to an enemy of (Owner of Bladestorm_Unit[PN]).) Equal to True
                    • Then - Actions
                      • Unit - Cause Bladestorm_Unit[PN] to damage (Picked unit), dealing Bladestorm_Damage[PN] damage of attack type Hero and damage type Normal
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
              • Custom script: call RemoveLocation (udg_Bladestorm_Point)
              • -------- --------
              • -------- Check if the Duration is over --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Bladestorm_Duration[PN] Less than or equal to 0
                • Then - Actions
                  • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
                • Else - Actions
            • Else - Actions
        • Else - Actions
          • -------- End the effect prematurely since the Unit is dead or hidden --------
          • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
Whenever a unit becomes Stunned it issues this order. You need to use Custom Script to catch it in GUI.
  • Bladestorm Stunned
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Triggering unit) Equal to Bladestorm_Unit[(Player number of (Triggering player))]
    • Actions
      • -------- This order is issued whenever a unit becomes stunned --------
      • Custom script: if GetIssuedOrderId() == 851973 then
      • -------- --------
      • Set VariableSet PN = (Player number of (Triggering player))
      • Trigger - Run Bladestorm Finish <gen> (ignoring conditions)
      • -------- --------
      • Custom script: endif
It helped keep things organized and neat by having this be it's own trigger. I run these Actions when one of the many situations occur (Unit dies, Unit becomes hidden, Bladestorm finishes, Unit becomes stunned, etc...).
  • Bladestorm Finish
    • Events
    • Conditions
    • Actions
      • -------- Set Bladestorm_Point to somewhere in the boundaries along the edge of the map (so you don't see/hear the Blademaster Sfx die) --------
      • Set VariableSet Bladestorm_Point = ((Center of (Playable map area)) offset by (-6000.00, 0.00))
      • Special Effect - Set Position of Bladestorm_Sfx[PN] to Bladestorm_Point
      • Special Effect - Destroy Bladestorm_Sfx[PN]
      • Custom script: call RemoveLocation (udg_Bladestorm_Point)
      • -------- --------
      • -------- Undisarm/Reset Transparency --------
      • Unit - Remove Cargo Hold (Orc Burrow) from Bladestorm_Unit[PN]
      • Animation - Change Bladestorm_Unit[PN]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • -------- --------
      • -------- Enable other Abilities --------
      • Unit - For Bladestorm_Unit[PN], Ability Wind Walk, Disable ability: False, Hide UI: False
      • Unit - For Bladestorm_Unit[PN], Ability Mirror Image, Disable ability: False, Hide UI: False
      • -------- --------
      • -------- Do this after you're done referencing Bladestorm_Unit[PN] --------
      • Set VariableSet Bladestorm_Unit[PN] = No unit
      • -------- --------
      • Countdown Timer - Pause Bladestorm_Timer[PN]

Thanks, I am going to use this, but you can still see the standing BM in the bladestorm SFX, its not much, but I can see his sword for example the easiest like when walking. I cant attack or anything so that's good, and because of the spinning animation over it, its not easily noticeable, but for whatever reason its not hidden like it should be :(
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,509
Yeah, unfortunately Reforged screwed up the transparency stuff, it used to work just fine.

You can also change the Unit's size to like 0.01%, which will "hide" it, but this creates a weird footprint effect where the unit produces 100x more footprints than normal. It's sort of neat though, you can draw figure 8s with it xD

And changing the size may have some other odd side effects as well.

Edit: After messing around with it, it seems like a combination of Transparency and reducing it's Size to ~10.00% works nicely, the footprints aren't AS bad at this size.

Edit 2: Another thing I just realized, the Special Effect's colors always show up as Red. Add this after you set Bladestorm_Sfx[PN] to fix it:
  • Special Effect - Set Color of Bladestorm_Sfx[PN] to color of (Triggering player)
 

Attachments

  • Bladestorm Example 2.w3m
    25.3 KB · Views: 30
Last edited:

311

311

Level 4
Joined
May 12, 2019
Messages
73
Yeah, unfortunately Reforged screwed up the transparency stuff, it used to work just fine.

You can also change the Unit's size to like 0.01%, which will "hide" it, but this creates a weird footprint effect where the unit produces 100x more footprints than normal. It's sort of neat though, you can draw figure 8s with it xD

And changing the size may have some other odd side effects as well.

Edit: After messing around with it, it seems like a combination of Transparency and reducing it's Size to ~10.00% works nicely, the footprints aren't AS bad at this size.

Edit 2: Another thing I just realized, the Special Effect's colors always show up as Red. Add this after you set Bladestorm_Sfx[PN] to fix it:
  • Special Effect - Set Color of Bladestorm_Sfx[PN] to color of (Triggering player)

cool thanks :), looks good
 
Status
Not open for further replies.
Top