HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

For some reason this damages the caster...

02-18-2007, 09:09 PM#1
st33m
But I have no idea why. Its supposed to move him and damage everything around him, but not supposed to hurt him or allies. It hurts him (and I'm not sure about allies). It hurts enemies too.

Trigger:
FSF
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Flow Silhouette Flash
Collapse Actions
Set FSF_Caster = (Casting unit)
Set FSF_CasterPosition = (Position of FSF_Caster)
Set FSF_TargetPoint = (Target point of ability being cast)
Set FSF_Distance = (Distance between FSF_CasterPosition and FSF_TargetPoint)
Set FSF_Angle = (Angle from FSF_CasterPosition to FSF_TargetPoint)
Set FSF_N = 0.00
Wait 0.20 seconds
Unit - Turn collision for FSF_Caster Off
Trigger - Turn on FSF Effect <gen>

Trigger:
FSF Effect
Collapse Events
Time - Every 0.03 seconds of game time
Conditions
Collapse Actions
Custom script: set udg_FSF_IsPathable = CheckPathability(GetUnitX(udg_FSF_Caster),GetUnitY(udg_FSF_Caster))
Set FSF_N = (FSF_N + 100.00)
Set FSF_CasterPosition = (Position of FSF_Caster)
Set FSF_MoveToPoint = (FSF_CasterPosition offset by 100.00 towards FSF_Angle degrees)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
FSF_IsPathable Equal to True
Collapse Then - Actions
Unit - Move FSF_Caster instantly to FSF_MoveToPoint, facing FSF_Angle degrees
Collapse Unit Group - Pick every unit in (Units within 200.00 of (Position of FSF_Caster) matching ((((Picked unit) is A structure) Equal to False) and (((Picked unit) belongs to an enemy of (Owner of FSF_Caster)) Equal to True))) and do (Actions)
Collapse Loop - Actions
Unit - Cause FSF_Caster to damage (Picked unit), dealing ((Real((Strength of FSF_Caster (Include bonuses)))) x 1.00) damage of attack type Hero and damage type Normal
Else - Actions
Custom script: call RemoveLocation(udg_FSF_MoveToPoint)
Custom script: call RemoveLocation(udg_FSF_CasterPosition)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
FSF_N Greater than or equal to 800.00
Collapse Then - Actions
Unit - Turn collision for FSF_Caster On
Custom script: set udg_FSF_Caster = null
Custom script: call RemoveLocation(udg_FSF_MoveToPoint)
Trigger - Turn off (This trigger)
Collapse Else - Actions
Do nothing

EDIT: Nevermind, friend figured it out for me. Need matching instead of picked...
02-18-2007, 09:22 PM#2
CommanderZ
In the line where you are selecting the group to be damaged must be
... matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of FSF_Caster)) Equal to True))) and do (Actions)

EDIT: Late :)
02-18-2007, 09:32 PM#3
st33m
Yeah, well thanks anyway :P