Trollvottel
never aging title
- Reaction score
- 261
SPELLPACK
Well, i just wanted to do something in GUI, so i made these 2 spells.
Fully MUI
Fully GUI (except leak removal)
Easy to import
Leakless (of course)
Spear Throw
Found no better description than this:
Throw 3 spears in the target direction. If a spear hits units, they will be damaged and the spear will disappear.
Screenshot:
Code(i had to translate it):
Ball (well, its more a rock than a ball)
Launches a ball towards the target location. If a unit comes into its way the ball will explode and the unit will be knockbacked and take damage.
Screenshot:
Code (another translation):
Well, i just wanted to do something in GUI, so i made these 2 spells.
Fully MUI
Fully GUI (except leak removal)
Easy to import
Leakless (of course)
Spear Throw
Found no better description than this:
Throw 3 spears in the target direction. If a spear hits units, they will be damaged and the spear will disappear.
Screenshot:

Code(i had to translate it):
Code:
SpearCast
Events
Unit - A Unit Starts the effect of an Ability
Conditions
(Ability being cast) equal to Spearthrow
Actions
-------- CONFIGURATION --------
-------- Maximum Distance --------
Set Spear_MaxD = (600.00 + (100.00 x (Real((Level of Spearthrow for (Triggering unit))))))
-------- Speed with each intervall --------
Set Spear_Speed = 25.00
-------- Damage delt to hit units --------
Set Spear_DMG = (20.00 + (80.00 x (Real((Level of Spearthrow for (Triggering unit))))))
-------- Range to collide with units --------
Set Spear_PickRange = 90.00
-------- Insert Unit-type here --------
Set Spear_Rawcode = Spear
-------- ------------- --------
-------- SPELL BEGINS --------
-------- ------------- --------
Set Spear_Temp_Loc[1] = (Position of (Triggering unit))
Set Spear_Temp_Loc[2] = (Target point of ability being cast)
Set Spear_Temp_Angle = (Angle from Spear_Temp_Loc[1] to Spear_Temp_Loc[2])
Set Spear_Temp_Loc[3] = (Spear_Temp_Loc[2] offset by 120.00 towards (Spear_Temp_Angle + 90.00) degrees)
Set Spear_Temp_Loc[4] = (Spear_Temp_Loc[2] offset by 120.00 towards (Spear_Temp_Angle - 90.00) degrees)
-------- -------------------- --------
Set Spear_Int = (Spear_Int + 1)
Set Spear_Caster[Spear_Int] = (Triggering unit)
Set Spear_Direction[Spear_Int] = (Angle from Spear_Temp_Loc[1] to Spear_Temp_Loc[2])
Set Spear_Curdis[Spear_Int] = 0.00
Set Spear_Damage[Spear_Int] = Spear_DMG
Set Spear_MaxDis[Spear_Int] = Spear_MaxD
Unit - Create 1 Spear_Rawcode for (Owner of (Triggering unit)) at Spear_Temp_Loc[1] facing Spear_Direction[Spear_Int] degrees
Set Spear_Flying[Spear_Int] = (Last created unit)
-------- -------------------- --------
Set Spear_Int = (Spear_Int + 1)
Set Spear_Caster[Spear_Int] = (Triggering unit)
Set Spear_Direction[Spear_Int] = (Angle from Spear_Temp_Loc[1] to Spear_Temp_Loc[3])
Set Spear_Curdis[Spear_Int] = 0.00
Set Spear_Damage[Spear_Int] = Spear_DMG
Set Spear_MaxDis[Spear_Int] = Spear_MaxD
Unit - Create 1 Spear_Rawcode for (Owner of (Triggering unit)) at Spear_Temp_Loc[1] facing Spear_Direction[Spear_Int] degrees
Set Spear_Flying[Spear_Int] = (Last created unit)
-------- -------------------- --------
Set Spear_Int = (Spear_Int + 1)
Set Spear_Caster[Spear_Int] = (Triggering unit)
Set Spear_Direction[Spear_Int] = (Angle from Spear_Temp_Loc[1] to Spear_Temp_Loc[4])
Set Spear_Curdis[Spear_Int] = 0.00
Set Spear_Damage[Spear_Int] = Spear_DMG
Set Spear_MaxDis[Spear_Int] = Spear_MaxD
Unit - Create 1 Spear_Rawcode for (Owner of (Triggering unit)) at Spear_Temp_Loc[1] facing Spear_Direction[Spear_Int] degrees
Set Spear_Flying[Spear_Int] = (Last created unit)
-------- -------------------- --------
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[1])
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[2])
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[3])
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[4])
SpearFly
Events
Time - Every 0.04 seconds of game time
Conditions
Spear_Int greater than 0
Actions
For each (Integer A) from 1 to Spear_Int, do (Actions)
Loop - Actions
Set Spear_Temp_Loc[1] = (Position of Spear_Flying[(Integer A)])
Set Spear_Temp_Loc[2] = (Spear_Temp_Loc[1] offset by Spear_Speed towards Spear_Direction[(Integer A)] degrees)
Unit - Move Spear_Flying[(Integer A)] instantly to Spear_Temp_Loc[2]
Set Spear_Curdis[(Integer A)] = (Spear_Curdis[(Integer A)] + Spear_Speed)
Set Spear_Temp_Group = (Units within Spear_PickRange of Spear_Temp_Loc[2] matching ((((Matching unit) is alive) Gleich True) and (((Matching unit) belongs to an enemy of (Owner of Spear_Flying[(Integer A)])) Gleich True)))
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[1])
Custom script: call RemoveLocation(udg_Spear_Temp_Loc[2])
UnitenGroup - Pick every unit in Spear_Temp_Group and do (Actions)
Loop - Actions
Set Spear_Release = True
Unit - Cause Spear_Caster[(Integer A)] to damage (Picked unit), dealing Spear_Damage[(Integer A)] damage of attack Spells and damage type Normal
Custom script: call DestroyGroup(udg_Spear_Temp_Group)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Condtitions
(Spear_Release equal to True) or (Spear_Curdis[(Integer A)] greater than or equal to Spear_MaxDis[(Integer A)])
'THEN'-Actions
Unit - Kill Spear_Flying[(Integer A)]
Set Spear_Damage[(Integer A)] = Spear_Damage[Spear_Int]
Set Spear_Curdis[(Integer A)] = Spear_Curdis[Spear_Int]
Set Spear_Direction[(Integer A)] = Spear_Direction[Spear_Int]
Set Spear_Flying[(Integer A)] = Spear_Flying[Spear_Int]
Set Spear_Caster[(Integer A)] = Spear_Caster[Spear_Int]
Set Spear_MaxDis[(Integer A)] = Spear_MaxDis[Spear_Int]
Set Spear_Int = (Spear_Int - 1)
'ELSE'-Actions
Set Spear_Release = False
Ball (well, its more a rock than a ball)
Launches a ball towards the target location. If a unit comes into its way the ball will explode and the unit will be knockbacked and take damage.
Screenshot:

Code (another translation):
Code:
BallCast
Events
Unit - A unit starts the effect of an ability
Conditions
(Ability being cast) Equal to Ball
Actions
-------- CONFIGURATION --------
-------- Unit Rawcode --------
Set Ball_UnitType = Bullet
-------- Damage Calculation --------
Set Ball_damage = (50.00 + (50.00 x (Real((Level of Ball for (Triggering unit))))))
-------- Slide Distance --------
Set Ball_maxdist = 200.00
-------- Fly Speed --------
Set Ball_flyspeed = 25.00
-------- Slide Speed --------
Set Ball_slidespeed = 10.00
-------- Slide SFX --------
Set Ball_SFX = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
-------- Collision Range --------
Set Ball_PickRange = 140.00
-------- ------------- --------
-------- SPELL BEGINS --------
-------- ------------- --------
Set Ball_temp_loc[1] = (Position of (Triggering unit))
Set Ball_temp_loc[2] = (Target point of ability being cast)
Set Ball_Int_1 = (Ball_Int_1 + 1)
Set Ball_damagetodo[Ball_Int_1] = Ball_damage
Set Ball_maxflydis[Ball_Int_1] = (Distance between Ball_temp_loc[1] and Ball_temp_loc[2])
Set Ball_caster[Ball_Int_1] = (Triggering unit)
Set Ball_curflydis[Ball_Int_1] = 0.00
Unit - Create 1 Ball_UnitType for (Owner of (Triggering unit)) at Ball_temp_loc[1] facing Vorgabe für Gebäude-Ausrichtung degrees
Set Ball_Bullet[Ball_Int_1] = (Last created unit)
Set Ball_angle[Ball_Int_1] = (Angle from Ball_temp_loc[1] to Ball_temp_loc[2])
Custom script: call RemoveLocation(udg_Ball_temp_loc[1])
Custom script: call RemoveLocation(udg_Ball_temp_loc[2])
Code:
BallFlight
Events
Time - Every 0.04 seconds of game time
Conditions
Ball_Int_1 greater than 0
Actions
For each (Integer A) from 1 to Ball_Int_1, do (Actions)
Loop - Actions
Set Ball_temp_loc[1] = (Position of Ball_Bullet[(Integer A)])
Set Ball_temp_loc[2] = (Ball_temp_loc[1] offset by Ball_flyspeed towards Ball_angle[(Integer A)] degrees)
Custom script: call RemoveLocation(udg_Ball_temp_loc[1])
Unit - Move Ball_Bullet[(Integer A)] instantly to Ball_temp_loc[2]
Set Ball_unit_group = (Units within Ball_PickRange of Ball_temp_loc[2] matching ((((Matching unit) is alive) Gleich True) and ((Ball_Bullet[(Integer A)] belongs to an enemy of (Owner of (Matching unit))) Gleich True)))
Unitgroup - Pick every unit in Ball_unit_group and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
Ball_sliding[(Custom value of (Picked unit))] equal to False
'THEN'-Actions
Set Ball_Release = True
Unit - Cause Ball_caster[(Integer A)] to damage (Picked unit), dealing Ball_damagetodo[(Integer A)] damage of attack type Zaubersprüche and damage type Normal
Set Ball_Int_2 = (Ball_Int_2 + 1)
Set Ball_sliding[(Custom value of (Picked unit))] = True
Set Ball_toSlide[Ball_Int_2] = (Picked unit)
Set Ball_temp_loc[3] = (Position of (Picked unit))
Set Ball_slideangle[Ball_Int_2] = (Angle from Ball_temp_loc[2] to Ball_temp_loc[3])
Set Ball_curslidedis[Ball_Int_2] = 0.00
Unit - Turn collision for (Picked unit) Aus
Custom script: call RemoveLocation(udg_Ball_temp_loc[3])
'ELSE'-Actions
Custom script: call DestroyGroup(udg_Ball_unit_group)
Set Ball_curflydis[(Integer A)] = (Ball_curflydis[(Integer A)] + Ball_flyspeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
Or - Any (Conditions) are true
Conditions
Ball_curflydis[(Integer A)] Greater than or equal to Ball_maxflydis[(Integer A)]
Ball_Release equal to True
'THEN'-Actions
Unit - Kill Ball_Bullet[(Integer A)]
Set Ball_Bullet[(Integer A)] = Ball_Bullet[Ball_Int_1]
Set Ball_angle[(Integer A)] = Ball_angle[Ball_Int_1]
Set Ball_maxflydis[(Integer A)] = Ball_maxflydis[Ball_Int_1]
Set Ball_curflydis[(Integer A)] = Ball_curflydis[Ball_Int_1]
Set Ball_caster[(Integer A)] = Ball_caster[Ball_Int_1]
Set Ball_Int_1 = (Ball_Int_1 - 1)
'ELSE'-Actions
Set Ball_Release = False
Custom script: call RemoveLocation(udg_Ball_temp_loc[2])
Code:
BallSlide
Events
Time - Every 0.04 seconds of game time
Conditions
Ball_Int_2 greater than 0
Actions
Set Ball_EYECANDYINT = (Ball_EYECANDYINT + 1)
For each (Integer A) from 1 to Ball_Int_2, do (Actions)
Loop - Actions
Set Ball_temp_loc[1] = (Position of Ball_toSlide[(Integer A)])
Set Ball_temp_loc[2] = (Ball_temp_loc[1] offset by Ball_slidespeed towards Ball_slideangle[(Integer A)] degrees)
Custom script: call RemoveLocation(udg_Ball_temp_loc[1])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
(Ball_EYECANDYINT mod 8) equal to 0
'THEN'-Actions
Spezialeffekt - Create a special effect at Ball_temp_loc[2] using Ball_SFX
Spezialeffekt - Destroy (Last created special effect)
'ELSE'-Actions
Unit - Move Ball_toSlide[(Integer A)] instantly to Ball_temp_loc[2]
Custom script: call RemoveLocation(udg_Ball_temp_loc[2])
Set Ball_curslidedis[(Integer A)] = (Ball_curslidedis[(Integer A)] + Ball_slidespeed)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Conditions
Ball_curslidedis[(Integer A)] greater than or equal to Ball_maxdist
'THEN'-Actions
Unit - Turn collision for Ball_toSlide[(Integer A)] Ein
Set Ball_sliding[(Custom value of Ball_toSlide[(Integer A)])] = False
Set Ball_toSlide[(Integer A)] = Ball_toSlide[Ball_Int_2]
Set Ball_slideangle[(Integer A)] = Ball_slideangle[Ball_Int_2]
Set Ball_curslidedis[(Integer A)] = Ball_curslidedis[Ball_Int_2]
Set Ball_Int_2 = (Ball_Int_2 - 1)
'ELSE'-Actions
Import Instructions Inside, download here:
Attachments
-
27.7 KB Views: 653