- Joined
- Jul 14, 2011
- Messages
- 3,213
Hi!
I'm trying to make a Triggered Bash, but isn't working. Bash has 0 duration (infinite) but is never removed.
I_DS = Damage Source ID
I_DU = Damaged Unit ID
Edit: Updated to the already working trigger.
- Changed the cast of Stormbolt for Passive Bash with 1 hour duration (Long enough). Stormbolt had a 0.27 casting time.
- Changed order from "Cast Stormbolt" to "Attack"
- The dummy just attacks once. Dummy attack has 0.1s speed, but 2 seg cooldown.
- Using "Key(Unit)" wasn't working. Worked when used GetHandleId
- Excluded the Dummy Unit from triggering the damage.
- Hero data = Player Data. Creeps data = Unit-Type data.
I checked the system you made for me, but it requires JNPG and mine doesn't work with hashtables. Thanks a lot.
I'm trying to make a Triggered Bash, but isn't working. Bash has 0 duration (infinite) but is never removed.
I_DS = Damage Source ID
I_DU = Damaged Unit ID
-
Damage Itself
-
Events
-
Game - GDD_Event becomes Equal to 0.00
-
-
Conditions
-
(Unit-type of GDD_DamageSource) Not equal to DUMMY
-
-
Actions
-
Set FontSize = 8.00
-
-------- DamagedUnit and DamageSource Id's --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GDD_DamagedUnit is A Hero) Equal to True
-
-
Then - Actions
-
Set I_DU = (Player number of (Triggering player))
-
-
Else - Actions
-
Custom script: set udg_I_DU = GetUnitTypeId(udg_GDD_DamagedUnit)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(GDD_DamageSource is A Hero) Equal to True
-
-
Then - Actions
-
Set I_DS = (Player number of (Owner of GDD_DamageSource))
-
-
Else - Actions
-
Custom script: set udg_I_DS = GetUnitTypeId(udg_GDD_DamageSource)
-
-
-
Set BashChance = (Load 15 of I_DS from DamageHash)
-
Set BashDuration = (Load 16 of I_DS from DamageHash)
-
-------- Bash Chance --------
-
Custom script: if udg_BashChance > 0 and GetRandomReal(0,1) <= udg_BashChance then
-
Custom script: set udg_i = GetHandleId(udg_GDD_DamagedUnit)
-
Set BashDur = ((Load 17 of i from DamageHash) + BashDuration)
-
Custom script: if udg_BashDur > 2.5 then
-
Custom script: set udg_BashDur = 2.5
-
Custom script: endif
-
Hashtable - Save BashDur as 17 of i in DamageHash
-
Set Point = (Position of GDD_DamagedUnit)
-
Unit - Create 1 DUMMY for (Owner of GDD_DamageSource) at Point facing Point
-
Unit - Order (Last created unit) to Attack GDD_DamagedUnit
-
Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
-
Unit Group - Add GDD_DamagedUnit to StunGroup
-
Trigger - Turn on StunGroup <gen>
-
Custom script: call RemoveLocation(udg_Point)
-
Custom script: endif
-
-
-
StunGroup
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in StunGroup and do (Actions)
-
Loop - Actions
-
Custom script: set udg_i = GetHandleId(GetEnumUnit())
-
Set BashDur = ((Load 17 of i from DamageHash) - 0.03)
-
Hashtable - Save BashDur as 17 of i in DamageHash
-
Game - Display to (All players) the text: (String(BashDur)) <- Testing Purposes
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BashDur Less than or equal to 0.00
-
-
Then - Actions
-
Hashtable - Save 0.00 as 17 of i in DamageHash
-
Unit - Remove Stunned (Pause) buff from (Picked unit)
-
Unit Group - Remove (Picked unit) from StunGroup
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in StunGroup) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Edit: Updated to the already working trigger.
- Changed the cast of Stormbolt for Passive Bash with 1 hour duration (Long enough). Stormbolt had a 0.27 casting time.
- Changed order from "Cast Stormbolt" to "Attack"
- The dummy just attacks once. Dummy attack has 0.1s speed, but 2 seg cooldown.
- Using "Key(Unit)" wasn't working. Worked when used GetHandleId
- Excluded the Dummy Unit from triggering the damage.
- Hero data = Player Data. Creeps data = Unit-Type data.
I checked the system you made for me, but it requires JNPG and mine doesn't work with hashtables. Thanks a lot.
Last edited: