Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Untitled Trigger 010

Events


Unit - A unit Acquires an item

Conditions


(Item-type of (Item being manipulated)) Equal to Claws of Attack +15

Actions


Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - 50.00)
SlowLoop

Events


Time - Every 0.02 seconds of game time

Conditions

Actions


Set TempLoc1 = (Position of SlowedUnit)


Set TempLoc2 = (Position of SlowDummy)


Set TempLoc = (TempLoc1 offset by (1.00 x StackTime) towards (Angle from TempLoc1 to TempLoc2) degrees)


Custom script: call SetUnitX (udg_SlowedUnit, GetLocationX (udg_TempLoc))


Custom script: call SetUnitY (udg_SlowedUnit, GetLocationY (udg_TempLoc))


Unit - Move SlowDummy instantly to TempLoc


Custom script: call RemoveLocation(udg_TempLoc)


Custom script: call RemoveLocation(udg_TempLoc1)


Custom script: call RemoveLocation(udg_TempLoc2)
The trigger methode just works for 1 boot only too -.-
0.02 just for a slowing item is a bit to much![]()
scope BigScaleSlow initializer Init
// gain it
private function Conditions_A takes nothing returns boolean
return GetItemTypeId(GetManipulatedItem()) == 'rde4'
endfunction
private function Actions_A takes nothing returns nothing
local unit u = GetTriggerUnit()
local item i = GetManipulatedItem()
local integer c = 0
local integer itemIndex = UnitInventorySize(u)
loop
exitwhen 0 > itemIndex
if UnitItemInSlot(u,itemIndex) != null and GetItemTypeId(i) == 'rde4' then
set c = c + 1
endif
set itemIndex = itemIndex - 1
endloop
if GetTriggerEventId() == EVENT_PLAYER_UNIT_DROP_ITEM then
set c = c - 1
endif
call SetUnitMoveSpeed(u,GetUnitDefaultMoveSpeed(u)-50*c)
set u = null
set i = null
endfunction
private function Init takes nothing returns nothing
local trigger trg = CreateTrigger()
call TriggerAddAction(trg, function Actions_A)
call TriggerAddCondition(trg, Condition(function Conditions_A))
call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_DROP_ITEM )
//call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_SELL_ITEM )
//call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_PAWN_ITEM )
set trg = null
endfunction
endscope
JASS:scope BigScaleSlow initializer Init private function Actions_A takes nothing returns nothing local unit u local item i local integer c = 0 local integer itemIndex if GetItemTypeId(GetManipulatedItem()) == 'rde4' then set u = GetTriggerUnit() set i = GetManipulatedItem() set itemIndex = = UnitInventorySize(u) loop exitwhen 0 > itemIndex if UnitItemInSlot(u,itemIndex) != null and GetItemTypeId(i) == 'rde4' then set c = c + 1 endif set itemIndex = itemIndex - 1 endloop if GetTriggerEventId() == EVENT_PLAYER_UNIT_DROP_ITEM then set c = c - 1 endif call SetUnitMoveSpeed(u,GetUnitDefaultMoveSpeed(u)-50*c) set u = null set i = null endif endfunction private function Init takes nothing returns nothing local trigger trg = CreateTrigger() call TriggerAddCondition(trg, Condition(function Actions_A)) call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_DROP_ITEM ) //call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_SELL_ITEM ) //call TriggerRegisterAnyUnitEventBJ( trg, EVENT_PLAYER_UNIT_PAWN_ITEM ) set trg = null endfunction endscope