- Joined
- Oct 12, 2011
- Messages
- 3,449
This isnt MUI
Trigger


then...

All units within the red line get stunned, but why doesn't it work to the units within green line?
please help
Trigger
I wanna create a spell named flashbang, so that the unit that face to the light will be stunned. But I have a problem, the stun only works for units that face north or between 0-180 degrees. doesn't work to units that face south or between 180-360 degrees. I dont know what's wrong. Please help
Holy Flash Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Holy Flash
Actions
Set HFCaster = (Casting unit)
Set HFPlayer = (Owner of HFCaster)
Set HFTargetPoint = (Target point of ability being cast)
Set HFLevel = (Level of (Ability being cast) for HFCaster)
Unit - Create 1 Holy Flash Stun for HFPlayer at HFTargetPoint facing (Random angle) degrees
Set HFDummy = (Last created unit)
Unit - Set level of Stun (Holy Flash) for HFDummy to HFLevel
Set HFGroup = (Units within (200.00 + (100.00 x (Real(HFLevel)))) of HFTargetPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of HFPlayer) Equal to True))))
Trigger - Turn on Holy Flash Loop <gen>
Holy Flash Loop
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set HFStunTarget = (Random unit from HFGroup)
Set HFTargetLoc = (Position of HFStunTarget)
Set HFTargetFacingAngle = (Facing of HFStunTarget)
Set HFTargetAngle = (Angle from HFTargetLoc to HFTargetPoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(HFTargetFacingAngle + 90.00) Less than or equal to ((HFTargetAngle + 90.00) + 90.00)
(HFTargetFacingAngle + 90.00) Greater than or equal to ((HFTargetAngle + 90.00) - 90.00)
Then - Actions
Unit - Order HFDummy to Human Mountain King - Storm Bolt HFStunTarget
Else - Actions
Unit Group - Remove HFStunTarget from HFGroup
Custom script: call RemoveLocation(udg_HFTargetLoc)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in HFGroup) Equal to 0
Then - Actions
Unit - Remove HFDummy from the game
Custom script: call RemoveLocation(udg_HFTargetPoint)
Custom script: call DestroyGroup(udg_HFGroup)
Trigger - Turn off (This trigger)
Else - Actions


then...

All units within the red line get stunned, but why doesn't it work to the units within green line?
Last edited by a moderator: