sidove
Member
- Reaction score
- 22
Hi I've got a back stab problem the player dosen't damage the target here's the code +rep for help.
Code:
Blade Embrace
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Blade Embrace (Shadowmancer)
Or - Any (Conditions) are true
Conditions
(Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast))) Less than or equal to ((Facing of (Target unit of ability being cast)) - 200.00)
(Angle from (Position of (Triggering unit)) to (Position of (Target unit of ability being cast))) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 160.00)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 1
(Random integer number between 1 and 100) Equal to 5
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 2
(Random integer number between 1 and 100) Equal to 10
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 3
(Random integer number between 1 and 100) Equal to 15
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 4
(Random integer number between 1 and 100) Equal to 20
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 5
(Random integer number between 1 and 100) Equal to 25
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 6
(Random integer number between 1 and 100) Equal to 30
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Level of Blade Embrace (Shadowmancer) for (Triggering unit)) Equal to 7
(Random integer number between 1 and 100) Equal to 35
Then - Actions
Unit - Create 1 BladeEmbrace_Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Blood Mage - Banish Back_Target
Set Back_Target = (Target unit of ability being cast)
Special Effect - Create a special effect attached to the origin of Back_Target using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Set Backstab = (Last created special effect)
Unit - Cause (Triggering unit) to damage Back_Target, dealing (100.00 x (Real((Level of Backstab for (Triggering unit))))) damage of attack type Normal and damage type Magic
Floating Text - Create floating text that reads (String(((Level of Backstab for (Triggering unit)) x 200))) above (Triggering unit) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Set Bsdmg = (Last created floating text)
Floating Text - Hide Bsdmg for (All players)
Floating Text - Change Bsdmg: Disable permanence
Floating Text - Change the lifespan of Bsdmg to 1.50 seconds
Special Effect - Destroy Backstab
Floating Text - Show Bsdmg for (All players)
Else - Actions