It's fine...
Jan 2, 2010 #22 K Kalder New Member Reaction score 1 Am i close? Trigger: Untitled Trigger 002 Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Static Cling Actions Set hitUnit[1] = (Target unit of ability being cast) Set RangeCounter = 500.00 Set Lightning_Pivot = (Position of (Targeted unit)) Set TempGroup = (Units within 500.00 of Lightning_Pivot matching (((Triggering player) is an enemy of (Owner of PickedUnit)) Equal to True)) Custom script: call RemoveLocation(udg_Spell_Pivot) For each (Integer A) from 1 to 3, do (Actions) Loop - Actions Set Lightning_Hook_Dummy = Lightning_Pivot Custom script: call RemoveLocation(udg_Tech_Pivot) Unit Group - Pick every unit in TempGroup and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions hitUnit[1] Not equal to (Picked unit) hitUnit[2] Not equal to (Picked unit) hitUnit[3] Not equal to (Picked unit) hitUnit[4] Not equal to (Picked unit) (Distance between Lightning_Hook_Dummy and (Position of (Picked unit))) Less than RangeCounter Then - Actions Set RangeCounter = (Distance between Lightning_Hook_Dummy and (Position of PickedUnit)) Set Lightning_Pivot = (Position of (Picked unit)) Set PickedUnit = (Picked unit) Set hitUnit[(Integer A)] = (Picked unit) Else - Actions Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at Lightning_Hook_Dummy facing Default building facing degrees Unit - Order (Last created unit) to Neutral - Firebolt PickedUnit Unit - Kill (Last created unit) Custom script: call RemoveLocation(udg_Tech_Warrior) Set Lightning_Hook_Dummy = (Position of (Triggering unit)) Custom script: call DestroyGroup(udg_TempGroup) Trigger - Turn on Pulling <gen> Wait 4.00 seconds Trigger - Turn off Pulling <gen> and Trigger: Pulling Events Time - Every 0.03 seconds of game time Conditions Actions For each (Integer A) from 1 to 4, do (Actions) Loop - Actions Set hitUnit[(Integer A)] = hitUnit[(Integer A)] Set offset[(Integer A)] = hitunitLoc[(Integer A)] Unit - Move hitUnit[(Integer A)] instantly to Laser_Point Set hitunitLoc[(Integer A)] = offset[(Integer A)] For each (Integer A) from 1 to 4, do (Actions) Loop - Actions Custom script: call RemoveLocation(udg_hitUnitLoc[GetForLoopIndexA]) Custom script: call RemoveLocation(udg_offset[GetForLoopIndexA]) Do i almost have it i could not figure out some of them
Am i close? Trigger: Untitled Trigger 002 Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Static Cling Actions Set hitUnit[1] = (Target unit of ability being cast) Set RangeCounter = 500.00 Set Lightning_Pivot = (Position of (Targeted unit)) Set TempGroup = (Units within 500.00 of Lightning_Pivot matching (((Triggering player) is an enemy of (Owner of PickedUnit)) Equal to True)) Custom script: call RemoveLocation(udg_Spell_Pivot) For each (Integer A) from 1 to 3, do (Actions) Loop - Actions Set Lightning_Hook_Dummy = Lightning_Pivot Custom script: call RemoveLocation(udg_Tech_Pivot) Unit Group - Pick every unit in TempGroup and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions hitUnit[1] Not equal to (Picked unit) hitUnit[2] Not equal to (Picked unit) hitUnit[3] Not equal to (Picked unit) hitUnit[4] Not equal to (Picked unit) (Distance between Lightning_Hook_Dummy and (Position of (Picked unit))) Less than RangeCounter Then - Actions Set RangeCounter = (Distance between Lightning_Hook_Dummy and (Position of PickedUnit)) Set Lightning_Pivot = (Position of (Picked unit)) Set PickedUnit = (Picked unit) Set hitUnit[(Integer A)] = (Picked unit) Else - Actions Unit - Create 1 Sorceress for (Owner of (Triggering unit)) at Lightning_Hook_Dummy facing Default building facing degrees Unit - Order (Last created unit) to Neutral - Firebolt PickedUnit Unit - Kill (Last created unit) Custom script: call RemoveLocation(udg_Tech_Warrior) Set Lightning_Hook_Dummy = (Position of (Triggering unit)) Custom script: call DestroyGroup(udg_TempGroup) Trigger - Turn on Pulling <gen> Wait 4.00 seconds Trigger - Turn off Pulling <gen> and Trigger: Pulling Events Time - Every 0.03 seconds of game time Conditions Actions For each (Integer A) from 1 to 4, do (Actions) Loop - Actions Set hitUnit[(Integer A)] = hitUnit[(Integer A)] Set offset[(Integer A)] = hitunitLoc[(Integer A)] Unit - Move hitUnit[(Integer A)] instantly to Laser_Point Set hitunitLoc[(Integer A)] = offset[(Integer A)] For each (Integer A) from 1 to 4, do (Actions) Loop - Actions Custom script: call RemoveLocation(udg_hitUnitLoc[GetForLoopIndexA]) Custom script: call RemoveLocation(udg_offset[GetForLoopIndexA]) Do i almost have it i could not figure out some of them
Jan 2, 2010 #23 S ShadowInTheD Active Member Reaction score 12 Two things I noticed, Trigger: Custom script: call RemoveLocation(udg_Tech_Pivot) should be Trigger: Custom script: call RemoveLocation(udg_Lightning_Pivot) and Trigger: Set offset[(Integer A)] = hitunitLoc[(Integer A)] needs to be fixed. Also, you can remove Trigger: Custom script: call RemoveLocation(udg_Spell_Pivot) at the top of the first one, that was my mistake. If you have questions on where to find the stuff for it just ask specifically.
Two things I noticed, Trigger: Custom script: call RemoveLocation(udg_Tech_Pivot) should be Trigger: Custom script: call RemoveLocation(udg_Lightning_Pivot) and Trigger: Set offset[(Integer A)] = hitunitLoc[(Integer A)] needs to be fixed. Also, you can remove Trigger: Custom script: call RemoveLocation(udg_Spell_Pivot) at the top of the first one, that was my mistake. If you have questions on where to find the stuff for it just ask specifically.
Jan 3, 2010 #24 K Kalder New Member Reaction score 1 how ok i changed those things but like you said to tell you i dont understand how you make Trigger: Set hitunitLoc[(Integer A)] = offset[(Integer A)] like you said to.
how ok i changed those things but like you said to tell you i dont understand how you make Trigger: Set hitunitLoc[(Integer A)] = offset[(Integer A)] like you said to.
Jan 3, 2010 #25 S ShadowInTheD Active Member Reaction score 12 Trigger: Set offset[(Integer A)] = (hitUnitLoc[(Integer A)] offset by 4.00 towards (Angle from hitUnitLoc[(Integer A)] to Spell_Caster) degrees) is found in Point with Polar Offset. And this neeeeds to be above the moving unit. Trigger: Set hitUnitLoc[(Integer A)] = (Position of hitUnit[(Integer A)]) Also make sure that hitUnitLoc is a point.
Trigger: Set offset[(Integer A)] = (hitUnitLoc[(Integer A)] offset by 4.00 towards (Angle from hitUnitLoc[(Integer A)] to Spell_Caster) degrees) is found in Point with Polar Offset. And this neeeeds to be above the moving unit. Trigger: Set hitUnitLoc[(Integer A)] = (Position of hitUnit[(Integer A)]) Also make sure that hitUnitLoc is a point.
Jan 3, 2010 #26 K Kalder New Member Reaction score 1 doesnt reallly work Trigger: Set offset[(Integer A)] = hitunitLoc[(Integer A)] wont work because hitunitLoc does not appear when i change it to a point and also Trigger: Set hitunitLoc[(Integer A)] = offset[(Integer A)] is not a possible combination either when i changed hitunitLoc to a point
doesnt reallly work Trigger: Set offset[(Integer A)] = hitunitLoc[(Integer A)] wont work because hitunitLoc does not appear when i change it to a point and also Trigger: Set hitunitLoc[(Integer A)] = offset[(Integer A)] is not a possible combination either when i changed hitunitLoc to a point