- Joined
- Dec 25, 2014
- Messages
- 109
Well, i need help to fix my spells to be working properly.
This spell is using unit indexer.
Here is the triggers :
I know this spell is not 100% work. What i want to do with this spell is :
Simple word, it is like a Multiple Shockwaves (maybe).
Thank you for the attention.
EDIT : Ah, is this the correct forum? i'm a bit confused to post this in here or maybe The Lab instead.
This spell is using unit indexer.
Here is the triggers :
-
To Arms Initialize
-
Events
-
Conditions
-
Actions
-
-------- This trigger is mean to create and initialize any data needed --------
-
Set ToArms_Ability = (Ability being cast)
-
Set ToArms_DummyUnit = Knight (Dummy)
-
Set ToArms_DummyAbility = Fuzzy (Dummy)
-
Set ToArms_Knights[1] = 3
-
Set ToArms_Knights[2] = 4
-
Set ToArms_Knights[3] = 5
-
Set ToArms_Knights[4] = 6
-
Set ToArms_CollisionSize[1] = 150.00
-
Set ToArms_CollisionSize[2] = 150.00
-
Set ToArms_CollisionSize[3] = 150.00
-
Set ToArms_CollisionSize[4] = 150.00
-
Set ToArms_Distance[1] = 600.00
-
Set ToArms_Distance[2] = 800.00
-
Set ToArms_Distance[3] = 1000.00
-
Set ToArms_Distance[4] = 1200.00
-
Set ToArms_Damage[1] = 70.00
-
Set ToArms_Damage[2] = 90.00
-
Set ToArms_Damage[3] = 110.00
-
Set ToArms_Damage[4] = 130.00
-
Set ToArms_AttackType = Chaos
-
Set ToArms_DamageType = Normal
-
Set ToArms_FinalDistance[1] = (ToArms_Distance[1] x (Real(ToArms_Knights[1])))
-
Set ToArms_FinalDistance[2] = (ToArms_Distance[2] x (Real(ToArms_Knights[2])))
-
Set ToArms_FinalDistance[3] = (ToArms_Distance[3] x (Real(ToArms_Knights[3])))
-
Set ToArms_FinalDistance[4] = (ToArms_Distance[4] x (Real(ToArms_Knights[4])))
-
Set ToArms_Offset[1] = 200.00
-
Set ToArms_Offset[2] = 200.00
-
Set ToArms_Offset[3] = 200.00
-
Set ToArms_Offset[4] = 200.00
-
Set ToArms_Speed[1] = 325.00
-
Set ToArms_Speed[2] = 325.00
-
Set ToArms_Speed[3] = 325.00
-
Set ToArms_Speed[4] = 325.00
-
Set ToArms_SFX = Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
-
-
-
To Arms Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to To Arms!
-
-
Actions
-
Trigger - Run To Arms Initialize <gen> (checking conditions)
-
-------- ---- --------
-
Set ToArms_Integer = (ToArms_Integer + 1)
-
-------- ---- --------
-
Set ToArms_Unit = (Triggering unit)
-
Set ToArms_Index = (Custom value of ToArms_Unit)
-
-------- ---- --------
-
Unit Group - Add ToArms_Unit to ToArms_TempUnitGroup
-
-------- ---- --------
-
Set ToArms_Owner[ToArms_Index] = (Owner of ToArms_Unit)
-
-------- ---- --------
-
Set ToArms_AbilityLevel[ToArms_Index] = (Level of ToArms_Ability for ToArms_Unit)
-
-------- ---- --------
-
Set ToArms_Angle[ToArms_Index] = (Facing of ToArms_Unit)
-
-------- ---- --------
-
Set ToArms_UnitPoint = (Position of ToArms_Unit)
-
-------- ---- --------
-
Set ToArms_Point = (ToArms_UnitPoint offset by 0.00 towards ToArms_Angle[ToArms_Index] degrees)
-
-------- ---- --------
-
For each (Integer A) from 1 to ToArms_Knights[ToArms_AbilityLevel[ToArms_Index]], do (Actions)
-
Loop - Actions
-
Set ToArms_Real = (ToArms_Real + (360.00 / (Real(ToArms_Knights[ToArms_AbilityLevel[ToArms_Index]]))))
-
-------- ---- --------
-
Set ToArms_Formation = (ToArms_Point offset by ToArms_Offset[ToArms_AbilityLevel[ToArms_Index]] towards ToArms_Real degrees)
-
-------- ---- --------
-
Unit - Create 1 ToArms_DummyUnit for ToArms_Owner[ToArms_Index] at ToArms_Formation facing ToArms_Angle[ToArms_Index] degrees
-
Unit - Turn collision for (Last created unit) Off
-
Unit Group - Add (Last created unit) to ToArms_TempDummyGroup
-
-------- ---- --------
-
Custom script: call RemoveLocation(udg_ToArms_Formation)
-
-
-
-------- ---- --------
-
Trigger - Turn on To Arms Loop <gen>
-
-------- ---- --------
-
Custom script: call RemoveLocation(udg_ToArms_UnitPoint)
-
Custom script: call RemoveLocation(udg_ToArms_Point)
-
-
-
To Arms Condtions
-
Events
-
Conditions
-
((Matching unit) is A structure) Equal to False
-
((Matching unit) is an illusion) Equal to False
-
((Matching unit) is Ethereal) Equal to False
-
((Matching unit) is alive) Equal to True
-
((Matching unit) is in ToArms_TempTargetGroup) Equal to False
-
((Matching unit) belongs to an enemy of (Owner of ToArms_TempUnit)) Equal to True
-
-
Actions
-
-------- Configure your conditions above --------
-
-
-
To Arms Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in ToArms_TempUnitGroup and do (Actions)
-
Loop - Actions
-
-------- ---- --------
-
Set ToArms_TempUnit = (Picked unit)
-
-------- ---- --------
-
Set ToArms_Index = (Custom value of ToArms_TempUnit)
-
-------- ---- --------
-
Unit Group - Pick every unit in ToArms_TempDummyGroup and do (Actions)
-
Loop - Actions
-
-------- ---- --------
-
Set ToArms_TempDummy[ToArms_Index] = (Picked unit)
-
-------- ---- --------
-
Set ToArms_DummyIndex = (Custom value of ToArms_TempDummy[ToArms_Index])
-
-------- ---- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ToArms_FinalDistance[ToArms_AbilityLevel[ToArms_Index]] Greater than 0.00
-
-
Then - Actions
-
-------- ---- --------
-
Set ToArms_DummyLoc[ToArms_Index] = (Position of ToArms_TempDummy[ToArms_Index])
-
-------- ---- --------
-
Set ToArms_TargetGroup[ToArms_DummyIndex] = (Units within ToArms_CollisionSize[ToArms_AbilityLevel[ToArms_Index]] of ToArms_DummyLoc[ToArms_Index] matching ((Evaluate To Arms Condtions <gen> conditions) Equal to True))
-
-------- ---- --------
-
Unit Group - Pick every unit in ToArms_TargetGroup[ToArms_DummyIndex] and do (Actions)
-
Loop - Actions
-
-------- ---- --------
-
Unit Group - Add (Picked unit) to ToArms_TempTargetGroup
-
-------- ---- --------
-
Unit Group - Pick every unit in ToArms_TempTargetGroup and do (Actions)
-
Loop - Actions
-
-------- ---- --------
-
Set ToArms_TempTarget[ToArms_DummyIndex] = (Picked unit)
-
-------- ---- --------
-
Special Effect - Create a special effect attached to the chest of ToArms_TempTarget[ToArms_DummyIndex] using Abilities\Spells\Other\Stampede\MissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-------- ---- --------
-
Unit - Create 1 Dummy for ToArms_Owner[ToArms_Index] at ToArms_DummyLoc[ToArms_Index] facing Default building facing degrees
-
Unit - Add ToArms_DummyAbility to (Last created unit)
-
Unit - Set level of ToArms_DummyAbility for (Last created unit) to ToArms_AbilityLevel[ToArms_Index]
-
Unit - Order (Last created unit) to Human Sorceress - Slow ToArms_TempTarget[ToArms_DummyIndex]
-
Unit - Cause ToArms_TempUnit to damage ToArms_TempTarget[ToArms_DummyIndex], dealing ToArms_Damage[ToArms_AbilityLevel[ToArms_Index]] damage of attack type ToArms_AttackType and damage type ToArms_DamageType
-
-------- ---- --------
-
Set ToArms_TempTarget[ToArms_DummyIndex] = No unit
-
-
-
-
-
-------- ---- --------
-
Set ToArms_MovetoLoc[ToArms_Index] = (ToArms_DummyLoc[ToArms_Index] offset by (ToArms_Speed[ToArms_AbilityLevel[ToArms_Index]] / 33.00) towards ToArms_Angle[ToArms_Index] degrees)
-
-------- ---- --------
-
Unit - Move ToArms_TempDummy[ToArms_Index] instantly to ToArms_MovetoLoc[ToArms_Index]
-
-------- ---- --------
-
Set ToArms_FinalDistance[ToArms_AbilityLevel[ToArms_Index]] = (ToArms_FinalDistance[ToArms_AbilityLevel[ToArms_Index]] - (ToArms_Speed[ToArms_AbilityLevel[ToArms_Index]] / 33.00))
-
-------- ---- --------
-
Special Effect - Create a special effect at ToArms_MovetoLoc[ToArms_Index] using ToArms_SFX
-
Special Effect - Set Scale of (Last created special effect) to 0.25
-
Special Effect - Destroy (Last created special effect)
-
-------- ---- --------
-
Custom script: call RemoveLocation(udg_ToArms_MovetoLoc[udg_ToArms_Index])
-
Custom script: call RemoveLocation(udg_ToArms_DummyLoc[udg_ToArms_Index])
-
Custom script: call DestroyGroup(udg_ToArms_TargetGroup[udg_ToArms_DummyIndex])
-
-
Else - Actions
-
-------- ---- --------
-
Unit Group - Pick every unit in ToArms_TempTargetGroup and do (Actions)
-
Loop - Actions
-
-------- ---- --------
-
Set ToArms_TempTarget[ToArms_DummyIndex] = (Picked unit)
-
-------- ---- --------
-
Unit Group - Remove ToArms_TempTarget[ToArms_DummyIndex] from ToArms_TempTargetGroup
-
-
-
-------- ---- --------
-
Unit - Remove ToArms_TempDummy[ToArms_Index] from the game
-
-------- ---- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ToArms_TargetGroup[ToArms_DummyIndex] is empty) Equal to True
-
(ToArms_TempDummyGroup is empty) Equal to True
-
-
Then - Actions
-
Set ToArms_Integer = (ToArms_Integer - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ToArms_Integer Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
I know this spell is not 100% work. What i want to do with this spell is :
- Fully MUI of course.
- Each enemy unit is only affected once per knight/dummy (damages, slow). So if there is 3 knights and a unit collides, the unit still can be affected by the rest(2) each.
- The knights/dummies formation to be like an arrow when cast, ignoring how much they are(?) (I'll post the example pics and more questions later if you don't understand).
- Dummies and the other data recycled correctly.
Thank you for the attention.
EDIT : Ah, is this the correct forum? i'm a bit confused to post this in here or maybe The Lab instead.
Last edited: