- Joined
- Nov 24, 2010
- Messages
- 546
Hello Guys, So I have tried to make a block chance based on hero's items.
Block = Reduce incoming damage by 50% (does not count spells, only normal attacks.)
I have several problems here.
I am not sure if it blocks damage and I don't know a way how to decet it.
Whenever hero block damage I want floating text around him saying "Block"
Note: I'm using https://www.hiveworkshop.com/forums...1016/?prev=search=damage%20engine&d=list&r=20
Setup Items
Block = Reduce incoming damage by 50% (does not count spells, only normal attacks.)
I have several problems here.
I am not sure if it blocks damage and I don't know a way how to decet it.
Whenever hero block damage I want floating text around him saying "Block"
Note: I'm using https://www.hiveworkshop.com/forums...1016/?prev=search=damage%20engine&d=list&r=20
Setup Items
-
BlockDatabase
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Hashtable - Create a hashtable
-


Set IBlock_Table = (Last created hashtable)
-


Set IBlock_IType = Block + 85%
-


Custom script: set udg_IBlock_I1 = udg_IBlock_IType
-


Hashtable - Save 85 as 0 of IBlock_I1 in IBlock_Table
-


Set IBlock_IType = Block + 5%
-


Custom script: set udg_IBlock_I1 = udg_IBlock_IType
-


Hashtable - Save 5 as 0 of IBlock_I1 in IBlock_Table
-
-
-
Block
-

Events
-


Game - DamageModifierEvent becomes Equal to 1.00
-
-

Conditions
-


DamageEventOverride Equal to False
-
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(DamageEventTarget is A Hero) Equal to True
-
-



Then - Actions
-




Set IBlock_I2 = 0
-




For each (Integer A) from 1 to 6, do (Actions)
-





Loop - Actions
-






Set IBlock_IType = (Item-type of (Item carried by DamageEventTarget in slot (Integer A)))
-






Custom script: set udg_IBlock_I1 = udg_IBlock_IType
-






Set IBlock_I2 = (IBlock_I2 + (Load 0 of IBlock_I1 from IBlock_Table))
-
-
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Random integer number between 1 and 100) Less than or equal to IBlock_I2
-
-





Then - Actions
-






Set DamageEventOverride = True
-






Set DamageEventAmount = (DamageEventAmount x 0.50)
-






Floating Text - Create floating text that reads Block! above DamageEventTarget with Z offset 50.00, using font size 10.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
-






Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
-






Floating Text - Change (Last created floating text): Disable permanence
-






Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
-






Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
-
-





Else - Actions
-
-
-
-
-





