- 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 ?
Thank you for your time, can you comeback and write when you have time please? I'm newbie learner ya knowYou 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).
Waow! thank you for your time master splitter! I'll try and let you know resaults.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
I have made so that illusions cannot trigger this, because it seems op.
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)
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.
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.I see some problems apart from those @ThompZon already mentioned.
1) Triggering unit refers to the atacked unit, I say this because
The triggers works if the "Atacked unit" has the ability and that has no sense, you should use "Attacking unit"
Level of Super Bash for Triggering unit Not equal to 0
2) The part of
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.
Unit - Add Strom Bolt to Attacked Unit
Unit - Add Critical Strike to Attacked Unit
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
So you wanna make the trigger depends of 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.