• 🏆 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!

Where do I Go Wrong?

Status
Not open for further replies.
Level 3
Joined
Feb 13, 2020
Messages
24
So I wanted to do a spell similar to bash but also aplies critical strike, boost of speed and throws storm bolt when casted. but It doesn't work what should I do ?
upload_2020-7-30_19-12-46.png
 
You have a few problems, but to start:
the "random number between 1 and 100 Equal to X". This is "Exactly equal to and nothing else", not "less than or equal to", resulting in 1% chance regardless of level. Change it to I guess you want "less than or equal to".

That should make the trigger do something.

After that, you have a few problems with that actions, but I don't have time to help you with that at this moment, sorry.
But what you're doing right now is adding abilities and setting the movement speed for "all future" (until something else sets the movement speed).
 
Level 3
Joined
Feb 13, 2020
Messages
24
You have a few problems, but to start:
the "random number between 1 and 100 Equal to X". This is "Exactly equal to and nothing else", not "less than or equal to", resulting in 1% chance regardless of level. Change it to I guess you want "less than or equal to".

That should make the trigger do something.

After that, you have a few problems with that actions, but I don't have time to help you with that at this moment, sorry.
But what you're doing right now is adding abilities and setting the movement speed for "all future" (until something else sets the movement speed).
Thank you for your time, can you comeback and write when you have time please? I'm newbie learner ya know ;) teach me master splitter!
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
I see some problems apart from those @ThompZon already mentioned.

1) Triggering unit refers to the atacked unit, I say this because
  • Level of Super Bash for Triggering unit Not equal to 0
The triggers works if the "Atacked unit" has the ability and that has no sense, you should use "Attacking unit"

2) The part of
  • Unit - Add Strom Bolt to Attacked Unit
  • Unit - Add Critical Strike to Attacked Unit
Also don't have sense, you are giving those abilities to the target, not casting those abilites on the target if that is you wanna do.

You have to fix them

My solution is when he cast the ability give to the Attacking unit a 100% chance critical strke ability and remove it later, and also create a dummy that cast the storm bolt to the Attacked unit
 
Ok, so this has a few problems, namely "A unit is attacked" triggers BEFORE the projectile is fired for projectile shooters, and before the animation for any attacker.
This is a problem because this can cause the trigger to... Trigger... when an attack is canceled by issueing a new order.

Therefore, you need to use Damage Engine 5.7.1.1 to detect when damage is caused if you want something to trigger "properly" on damage being dealt.
Actually, my map uses the damage engine to implement a custom crit system.

You will need read how to import it and do it.

You will need to create a "dummy unit" that will do the actual casting of the storm bolt:
Dummy Unit Proper Fields

Then you can create the storm bolt-based custom ability where you set the stun duration

  • Helper
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Paladin
      • (DamageEventSource is an illusion) Equal to False
      • IsDamageSpell Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • ((Level of Storm Bolt for DamageEventSource) Equal to 1) and ((Random integer number between 1 and 10) Less than or equal to 1)
          • ((Level of Storm Bolt for DamageEventSource) Equal to 2) and ((Random integer number between 1 and 10) Less than or equal to 2)
          • ((Level of Storm Bolt for DamageEventSource) Equal to 3) and ((Random integer number between 1 and 10) Less than or equal to 3)
    • Actions
      • -------- This is the "fake crit", doing more damage by times 2 (can be any number ofc) --------
      • Set DamageEventAmount = (DamageEventAmount x 2.00)
      • -------- This is the "fake crit", damage text, it's impossible to do it in any other way as far as I know --------
      • Set temp_point = (Position of DamageEventSource)
      • Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + !) at temp_point with Z offset 125.00, using font size 12.00, color (100.00%, 5.00%, 5.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 0.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
      • -------- This is the stun, using the dummy unit --------
      • Unit - Create 1 UnitDummy for (Owner of DamageEventSource) at temp_point facing Default building facing degrees
      • Unit - Add Charge Stun (Storm Bolt based) to (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt DamageEventTarget
      • -------- This is cleaning up a "leak" --------
      • Custom script: call RemoveLocation(udg_temp_point)
I have made so that illusions cannot trigger this, because it seems op.
My example hero is Paladin (should be your hero unit) and the Level of <ability> should be the correct ability, ofc.
I have left out the movement speed, but you should probably make a "Bloodlust"-based ability to increase the movement speed of the unit, add it to the dummy unit and cast it on the DamageEventSource-unit

You asked for something that the wc3 engine is pretty bad at, unfortunately.
 
Level 3
Joined
Feb 13, 2020
Messages
24
Ok, so this has a few problems, namely "A unit is attacked" triggers BEFORE the projectile is fired for projectile shooters, and before the animation for any attacker.
This is a problem because this can cause the trigger to... Trigger... when an attack is canceled by issueing a new order.

Therefore, you need to use Damage Engine 5.7.1.1 to detect when damage is caused if you want something to trigger "properly" on damage being dealt.
Actually, my map uses the damage engine to implement a custom crit system.

You will need read how to import it and do it.

You will need to create a "dummy unit" that will do the actual casting of the storm bolt:
Dummy Unit Proper Fields

Then you can create the storm bolt-based custom ability where you set the stun duration

  • Helper
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Paladin
      • (DamageEventSource is an illusion) Equal to False
      • IsDamageSpell Equal to False
      • Or - Any (Conditions) are true
        • Conditions
          • ((Level of Storm Bolt for DamageEventSource) Equal to 1) and ((Random integer number between 1 and 10) Less than or equal to 1)
          • ((Level of Storm Bolt for DamageEventSource) Equal to 2) and ((Random integer number between 1 and 10) Less than or equal to 2)
          • ((Level of Storm Bolt for DamageEventSource) Equal to 3) and ((Random integer number between 1 and 10) Less than or equal to 3)
    • Actions
      • -------- This is the "fake crit", doing more damage by times 2 (can be any number ofc) --------
      • Set DamageEventAmount = (DamageEventAmount x 2.00)
      • -------- This is the "fake crit", damage text, it's impossible to do it in any other way as far as I know --------
      • Set temp_point = (Position of DamageEventSource)
      • Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + !) at temp_point with Z offset 125.00, using font size 12.00, color (100.00%, 5.00%, 5.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 0.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.40 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 128.00 towards 90.00 degrees
      • -------- This is the stun, using the dummy unit --------
      • Unit - Create 1 UnitDummy for (Owner of DamageEventSource) at temp_point facing Default building facing degrees
      • Unit - Add Charge Stun (Storm Bolt based) to (Last created unit)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt DamageEventTarget
      • -------- This is cleaning up a "leak" --------
      • Custom script: call RemoveLocation(udg_temp_point)
I have made so that illusions cannot trigger this, because it seems op.
My example hero is Paladin (should be your hero unit) and the Level of <ability> should be the correct ability, ofc.
I have left out the movement speed, but you should probably make a "Bloodlust"-based ability to increase the movement speed of the unit, add it to the dummy unit and cast it on the DamageEventSource-unit

You asked for something that the wc3 engine is pretty bad at, unfortunately.
Waow! thank you for your time master splitter! I'll try and let you know resaults.
 
Level 3
Joined
Feb 13, 2020
Messages
24
I see some problems apart from those @ThompZon already mentioned.

1) Triggering unit refers to the atacked unit, I say this because
  • Level of Super Bash for Triggering unit Not equal to 0
The triggers works if the "Atacked unit" has the ability and that has no sense, you should use "Attacking unit"

2) The part of
  • Unit - Add Strom Bolt to Attacked Unit
  • Unit - Add Critical Strike to Attacked Unit
Also don't have sense, you are giving those abilities to the target, not casting those abilites on the target if that is you wanna do.

You have to fix them

My solution is when he cast the ability give to the Attacking unit a 100% chance critical strke ability and remove it later, and also create a dummy that cast the storm bolt to the Attacked unit
I thou that attacking unit is me. so I thou why should I damage myself with Crit and stun? so I made it attacked unit.
 
Status
Not open for further replies.
Top