Moderator
M
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.
(1 ratings)
Approved
Corruption Remove

Events


Unit - A unit Dies

Conditions

Actions


Set TempUnit = (Triggering unit)


Set TempUnitType = (Unit-type of TempUnit)


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



If - Conditions




Or - Any (Conditions) are true





Conditions






TempUnitType Equal to Corruption (Level 1)






TempUnitType Equal to Corruption (Level 2)






TempUnitType Equal to Corruption (Level 3)






TempUnitType Equal to Corruption (Level 4)



Then - Actions




Set TempPoint = (Position of TempUnit)




Unit - Create 1 Remover for (Triggering player) at TempPoint facing (Facing of TempUnit) degrees




Unit - Add a 1.00 second Generic expiration timer to (Last created unit)




Custom script: call RemoveLocation(udg_TempPoint)



Else - Actions
Thank you. But I havent thought of a cool name for this spell. The trigger is very simple, it is too embarassing
Unit - Create 1 Remover for (Owner of (Dying unit)) at (Position of (Dying unit)) facing (Facing of (Dying unit)) degrees
Call RemoveLocation(udg_PointVariable)//Replace PointVariable with your point variablePerfectionbasic stuff has to be -perfect- to be approved
Corruption Remove

Events

Unit - A unit Dies

Conditions

Actions


Set TempUnit = Triggering Unit


If - Conditions



Or - Any (Conditions) are true




(Unit-type of (TempUnit)) Equal to Corruption (Level 2)




(Unit-type of (TempUnit)) Equal to Corruption (Level 3)




(Unit-type of (TempUnit)) Equal to Corruption (Level 4)




(Unit-type of (TempUnit)) Equal to Corruption (Level 1)


Then - Actions



Unit - Create 1 Remover for (Owner of (TempUnit)) at (Position of (TempUnit) facing (Facing of (TempUnit)) degrees



Set RemovePoint = (Position of (Last created unit))



Unit - Add a 1.00 second Generic expiration timer to (Last created unit)



Custom script: call RemoveLocation(udg_RemovePoint)


Else - Actions
(Unit-type of (TempUnit))
Unit - Create 1 Remover for (Owner of (TempUnit)) at (Position of (TempUnit) facing (Facing of (TempUnit)) degrees
Set RemovePoint = (Position of (Last created unit))
Custom script: call RemoveLocation(udg_RemovePoint)
Corruption Remove

Events

Unit - A unit Dies

Conditions

Actions


Set TempUnit = Triggering Unit


If - Conditions



Or - Any (Conditions) are true




(Unit-type of (TempUnit)) Equal to Corruption (Level 2)




(Unit-type of (TempUnit)) Equal to Corruption (Level 3)




(Unit-type of (TempUnit)) Equal to Corruption (Level 4)




(Unit-type of (TempUnit)) Equal to Corruption (Level 1)


Then - Actions



Unit - Create 1 Remover for (Owner of (TempUnit)) at (Position of (TempUnit) facing (Facing of (TempUnit)) degrees



Set RemovePoint = (Position of (Last created unit))



Unit - Add a 1.00 second Generic expiration timer to (Last created unit)



Custom script: call RemoveLocation(udg_RemovePoint)


Else - Actions
Corruption Remove

Events

Unit - A unit Dies

Conditions

Actions


Set tempUnit = Triggering Unit


Set tempUnitType = (Unit-type of (tempUnit))


If - Conditions



Or - Any (Conditions) are true




tempUnitType Equal to Corruption (Level 2)




tempUnitType Equal to Corruption (Level 3)




tempUnitType Equal to Corruption (Level 4)




tempUnitType Equal to Corruption (Level 1)


Then - Actions



Set tempPoint = (Position of (tempUnit))



Unit - Create 1 Remover for (Owner of (tempUnit)) at tempPoint facing (Facing of (tempUnit)) degrees



Unit - Add a 1.00 second Generic expiration timer to (Last created unit)



Custom script: call RemoveLocation(udg_tempPoint)


Else - Actions
it remains until Mod approve or reject/needs fix your resources, an approved spell don't have tags and a rejected/needs fix have their respective tag on the spell.Why is there a word "Pending" ?? how do i remove it?
I thought you were only able to use 'triggering player' with player events, not unit events?^ Even better:
(Owner of (tempUnit)) -> (Triggering player)
Untitled Trigger 002

Events


Unit - A unit Dies

Conditions

Actions
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
set gg_trg_Untitled_Trigger_002 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_002, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
(Owner of TempUnit)
Triggering Player

