Moderator
M
Moderator
|
Water Blast Config

Events


Map initialization

Conditions

Actions


-------- CONFIGURABLES --------


-------- Ability (set this to the correct one) --------


Set WB_Ability = Water Blast


-------- Special Effect (effect that appears on target point) --------


Set WB_Effect = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl


-------- Blast Radius (how big is the radius of the blast take effects) --------


Set WB_Radius[1] = 500.00


Set WB_Radius[2] = 500.00


Set WB_Radius[3] = 500.00


-------- Damage Amount (Amount of damage dealt upon explosion) --------


Set WB_Damage[1] = 100.00


Set WB_Damage[2] = 200.00


Set WB_Damage[3] = 300.00


-------- Set this if you want trees to be destroyed or not. --------


Set WB_DestroyTrees = True


-------- set this to True if you want trees to gain a Special Effect at it's position upon destroyed, only set the other variable to an effect if the first one set to true, leave this be if you don't destroy trees --------


Set WB_DestroyTreesEffect = True


Set WB_DestEffect = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl


-------- END CONFIGURABLES --------


-------- DO NOT TOUCH --------


-------- don't edit these script, I don't take any responsibility if you try. --------


-------- below are meant to be not User-Friendly, because this is part of the spell's core --------


Custom script: set udg_WB_Order = "harvest"


Custom script: if ( udg_WB_DestroyTrees == true ) then


Custom script: set udg_WB_DestKiller = CreateUnit(Player(15), 'hpea', 0, 0, 0)


Custom script: call UnitAddAbility( udg_WB_DestKiller, 'Aloc' )


Custom script: call UnitAddAbility( udg_WB_DestKiller, 'Avul' )


Custom script: call ShowUnit( udg_WB_DestKiller, false )


Custom script: endif
Water Blast Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to WB_Ability

Actions


-------- You know what? skip this --------


Set WB_CastUnit = (Triggering unit)


Set WB_Loc = (Target point of ability being cast)


Set WB_Level = (Level of WB_Ability for WB_CastUnit)


Special Effect - Create a special effect at WB_Loc using WB_Effect


Special Effect - Destroy (Last created special effect)


-------- Blast them all!! --------


Custom script: set bj_wantDestroyGroup = true


Unit Group - Pick every unit in (Units within WB_Radius[WB_Level] of WB_Loc) and do (Actions)



Loop - Actions




Set WB_TempUnit = (Picked unit)




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





If - Conditions






(WB_TempUnit is A structure) Equal to False






(WB_TempUnit belongs to an enemy of (Triggering player)) Equal to True






(WB_TempUnit is A flying unit) Equal to False





Then - Actions






Set WB_Loc2 = (Position of WB_TempUnit)






Set WB_KAngle = (Angle from WB_Loc to WB_Loc2)






Unit - Cause WB_CastUnit to damage WB_TempUnit, dealing WB_Damage[WB_Level] damage of attack type Spells and damage type Normal






Trigger - Run Water Blast KB3D <gen> (ignoring conditions)






Custom script: call RemoveLocation(udg_WB_Loc2)





Else - Actions


-------- how bout we just destroy those trees to ashes? DestroyTrees = True is needed --------


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



If - Conditions




WB_DestroyTrees Equal to True



Then - Actions




Destructible - Pick every destructible within WB_Radius[WB_Level] of WB_Loc and do (Actions)





Loop - Actions






Set WB_TempDest = (Picked destructible)






Unit - Order WB_DestKiller to Harvest WB_TempDest






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







If - Conditions








(Current order of WB_DestKiller) Equal to (Order(WB_Order))







Then - Actions








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









If - Conditions










(WB_TempDest is alive) Equal to True










WB_DestroyTreesEffect Equal to True









Then - Actions










Set WB_DestPos = (Position of WB_TempDest)










Special Effect - Create a special effect at WB_DestPos using WB_DestEffect










Special Effect - Destroy (Last created special effect)










Custom script: call RemoveLocation(udg_WB_DestPos)









Else - Actions








Destructible - Kill WB_TempDest







Else - Actions






Unit - Order WB_DestKiller to Stop



Else - Actions


Custom script: call RemoveLocation(udg_WB_Loc)
Water Blast KB3D

Events

Conditions

Actions


-------- Those Values are Required for the KB --------


-------- ------------------------------------------------ --------


-------- ------------------------ --------


-------- Knock-Backed Unit, the Knock-Backed Unit who all actions orbit around --------


Set KB3D_Unit = WB_TempUnit


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Max Range, Maximum Range possible of the Knock-Back --------


Set KB3D_Range = 600.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Base KB Speed, Base Speed when starting the Knock-Back --------


Set KB3D_Speed = 250.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Angle, The KB's line angle, this will be useless if KB3D_Targeted_Unit is not null --------


Set KB3D_Angle = WB_KAngle


-------- Requires: NONE --------


-------- ------------------------ --------


-------- ------------------------------------------------ --------


-------- Those Values are Optional for the KB --------


-------- NOTE: some values may depend on other to function, like LineDamage that needs "Damager, AttackType, DamageType, AoE" to function --------


-------- ------------------------------------------------ --------


-------- ------------------------ --------


-------- Targets Allowed --------


-------- ------------------------ --------


-------- Filter Damages and AoEKB with those values, if true, each one will allow filtering of Structures, Mechanicals, Magic Imminues, Allies --------


-------- ------------------------ --------


Set KB3D_D_MAGIC_IMMINUE = False


Set KB3D_D_ALLY = False


Set KB3D_D_MECHANICAL = False


Set KB3D_D_STRUCTURE = False


Set KB3D_D_ENEMY = True


Set KB3D_D_FLYING = False


Set KB3D_D_RESISTANT = False


-------- Requires: AoEKB, or, Damagers, or, BounceTarget --------


-------- ------------------------ --------


-------- Speed Changer, makes the unit move forward with a bonus speed equal to the KB speed, negative speed also works --------


Set KB3D_Speed_Changer = False


-------- Requires: NONE, Disables Angle --------


-------- ------------------------ --------


-------- Homing Missile, automatically sets needed features of KB3D for a homing missile --------


Set KB3D_HomingMissile = True


-------- Requires: NONE, Disables Angle --------


-------- ------------------------ --------


-------- Bounce Unit, Makes the KBed unit bounce on unpathable areas and units --------


Set KB3D_Bounce_Unit = False


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Bounce Targets, Bounces units that encounter the KBed unit --------


Set KB3D_Bounce_Target = False


-------- Requires: AoE --------


-------- ------------------------ --------


-------- End on Target Bounce, when hits a unit, ends the KB --------


Set KB3D_EndOnTargetBounce = False


-------- Requires: Bounce_Target --------


-------- ------------------------ --------


-------- Bounce Power, intensity of the Bounce --------


Set KB3D_Bounce_Power = 1.00


-------- Requires: Bounce --------


-------- ------------------------ --------


-------- Bounce Effect, Effect created on units that get Bounced --------


Set KB3D_Bounce_Fx = <Empty String>


-------- Requires: Bounce --------


-------- ------------------------ --------


-------- Destroy Destructibles, Destroys any destructibles on the path of the KB, does not destroy platforms, bridges, elevators --------


Set KB3D_DestroyDestructables = True


-------- Requires: Line Damage --------


-------- ------------------------ --------


-------- Line Effect, Effect created on units damaged by Line Damage --------


Set KB3D_Line_Fx = <Empty String>


-------- Requires: Line Damage --------


-------- ------------------------ --------


-------- End Trigger, This trigger will be excecuted at the end of the KB, you can use KB3D_Unit and KB3D_Targeted_Unit variables in the trigger --------


Set KB3D_EndTrigger = KB3D_EndTrigger


-------- Requires: NONE --------


-------- ------------------------ --------


-------- End on Obstacle, Immediatly Ends the KB if the KBed unit encounters an unpathable area --------


Set KB3D_EndOnObstacle = False


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Arc, Arc of the Angle of the KB, does not work with homing KB --------


Set KB3D_Arc = 0.00


-------- Requires: Angle --------


-------- ------------------------ --------


-------- Ending Effect, an Effect created at the End of the KB on the KBed Unit --------


Set KB3D_EndFx = Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl


-------- Requires: AoE --------


-------- ------------------------ --------


-------- AoE End Damage, Damage dealt to enemy units in the AoE at the End of the KB --------


Set KB3D_AoEEndDamage = 0.00


-------- Requires: AoE, Damager, AType, DType --------


-------- ------------------------ --------


-------- AoE KB, if true, KBs Enemy units within the AoE, Range, Speed, Angle, are automatic --------


Set KB3D_AoEKB = False


-------- Requires: AoE --------


-------- ------------------------ --------


-------- AoE KB Power, The Power of the AoE KB, default value is 1.00 (normal), Min value: 0.01, Max value: 3.00 --------


Set KB3D_AoEKB_Power = 0.00


-------- Requires: AoEKB --------


-------- ------------------------ --------


-------- End when Dead, if true, the KB will end if the KBed unit is dead, TRUE by default --------


Set KB3D_EndwhenDead = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Ground Damage, Damages the Unit When it hits the Ground, Damage dealt is KB3D_ImpactDamage --------


Set KB3D_GroundDamage = False


-------- Requires: Damager, ImpactDamage, AType, DType --------


-------- ------------------------ --------


-------- KB the Target, When the Targeted Unit is hit, it will be KBed depending on the speed of the original KB --------


Set KB3D_KBTarget = False


-------- Requires: Targeted_Unit --------


-------- ------------------------ --------


-------- Stop Time, Maximum Time the KB will last, Note that if the KBed unit is flying at this time, it will be stuck --------


Set KB3D_StopTime = 0.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Kill at End, Kills the KBed Unit at the End of the KB --------


Set KB3D_KillatEnd = False


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Kill at Time, When this time is reached, the KBed unit will be killed, if this number is higher than KB3D_StopTime, EndWhenDead will be automatically turned on no matter what --------


Set KB3D_KillatTime = 0.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Acceleration, Speed Added/s to the KB speed --------


Set KB3D_Accel = 0.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Allow going outside playable bounds, Allows the KBed unit to go out of the Playable Bounds, SAFETY notice: this will not crash the game --------


Set KB3D_AllowOutSiding = False


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Area of Effect, Range where the Line Damage is applied to units --------


Set KB3D_AoE = 0.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Area of Effect Damage, Makes the KB3D_Damager, damage enemy units within KB3D_AoE by this value as a DPS --------


Set KB3D_AoEDamage = 0.00


-------- Requires: AoE, Damager, DType, AType --------


-------- ------------------------ --------


-------- Attack Type, Attack type of ALL damagings in the Instance --------


Set KB3D_AttackType = Normal


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Damage Type, Damage type of ALL damagings in the Instance --------


Set KB3D_DamageType = Magic


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Damager, Source of ALL damagings in the Instance --------


Set KB3D_Damager = No unit


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Destroy Trees?, Destroy Trees around the KBed unit while he is KBed? --------


Set KB3D_DestroyTree = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Disable Unit?, Disable the KBed Unit's Movement and Turning? --------


Set KB3D_DisableUnit = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- End When Hit?, Ends the KB if the KBed Unit hits the Targeted Unit --------


Set KB3D_EndWhenHit = False


-------- Requires: Targeted_Unit --------


-------- ------------------------ --------


-------- Face KB Anlge, makes the KBed Unit Face the Anlge of the KB during the KB --------


Set KB3D_FaceAngle = False


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Effect, Effect created on the Unit's Location if he is not flying, and applied on the Unit if he is flying on the Attach Point --------


Set KB3D_Fx = Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl


-------- Requires: Attach --------


-------- ------------------------ --------


-------- Attachment Point, location on the KBed unit where Effects are attached --------


Set KB3D_Attach = origin


-------- Requires: NONE --------


-------- ------------------------ --------


-------- AoE End Effect, Effect Created on target units in the AoE at the End of the KB --------


Set KB3D_AoEEndFx = Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl


-------- Requires: AoE, Attach --------


-------- ------------------------ --------


-------- Impact Damage, Damaged dealt to the KBed Unit if he hits an obstacle --------


Set KB3D_ImpactDamage = 0.00


-------- Requires: Damager --------


-------- ------------------------ --------


-------- intelligent KB, Enables the intelligent features of KB3D, see Main Code Comments for more info --------


Set KB3D_iKB = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Kill When Hit?, Kills the KBed Unit if he hits the Targeted Unit, Automatically set EndWhenHit to true --------


Set KB3D_KillWhenHit = False


-------- Requires: Targeted_Unit --------


-------- ------------------------ --------


-------- Kill if Out of Playable Bounds, Kills the KBed Unit if he gets out of Playable Bounds, this automatically sets KB3D_AllowOutSiding to TRUE --------


Set KB3D_KillifOutSider = False


-------- Requires: AllowOutSiding --------


-------- ------------------------ --------


-------- Line Damage, Damage dealt to enemy units in the AoE around the KBed Unit --------


Set KB3D_LineDamage = 0.00


-------- Requires: Damager, AoE --------


-------- ------------------------ --------


-------- Loop Damage, DPS dealt to the KBed Unit --------


Set KB3D_LoopDamage = 0.00


-------- Requires: Damager, AoE --------


-------- ------------------------ --------


-------- Jump over Cliff, Allows the KBed unit to go over cliffs if he has more than 150 fly height and IF there is a possible location where he can land in a pathable point, not recommended with >0 Acceleration --------


Set KB3D_JumpOverCliff = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Target Damage, Damage dealt to the Targeted Unit when both KBed Unit and Targeted Unit hit each other, only happens once --------


Set KB3D_TargetDamage = 0.00


-------- Requires: Targeted_Unit, Damager --------


-------- ------------------------ --------


-------- Targeted Unit, if not null, makes the KBed Unit act like a homing missile targeting this unit, it also used for other functions --------


Set KB3D_Targeted_Unit = No unit


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Trail Effect, Effect Attached on the KBed Unit all along the Knock-Back and Destroyed at the end of the KB --------


Set KB3D_TrailFx = Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl


-------- Requires: Attach --------


-------- ------------------------ --------


-------- Stop at Unpathable, Makes it impossible for the KBed Unit to path throught Unpathable Terrain --------


Set KB3D_UnpathableStop = True


-------- Requires: NONE --------


-------- ------------------------ --------


-------- Z Offset, Max Flying Height reached while Knockbacking --------


Set KB3D_Zoffset = 500.00


-------- Requires: NONE --------


-------- ------------------------ --------


-------- ------------------------------------------------ --------


-------- Registed All of the Settings --------


Custom script: call ExecuteFunc( "KB3D_Registration" )


-------- You can use the following to know how much the knock-back will last -- this can vary if the KB is homed on a moving unit --------


Set KB3D_Time = KB3D_Time
(Special Thanks to Jad)