Dirac
22710180
- Reaction score
- 147
Pudge Wars on GUI - MPI by Dirac Based on Pudge Wars Meat Hook by Trollvottel
Yep, thats it. A GUI version of Trollvottel Pugde Wars on GUI - MPI. Works very similar, but has some lag (in the pullback). Very customizable and friendly code for starters. Report any leaks - bugs.
No need for JASS
Update:
Lag reduced substancially
Most leaks cleared (help me to find em )
Removed the Multiple Unit Hook due bugs
Now is a MUI up to 12 ability (12 units can cast it at the same time whoever the owner is)
Added Some Customization Features at the Cast Trigger (DMGdone and MAXdistance)
Removed the Bounce due bugs (help me to find the propper equation)
The Code!
Yep, thats it. A GUI version of Trollvottel Pugde Wars on GUI - MPI. Works very similar, but has some lag (in the pullback). Very customizable and friendly code for starters. Report any leaks - bugs.
No need for JASS
Update:
Lag reduced substancially
Most leaks cleared (help me to find em )
Removed the Multiple Unit Hook due bugs
Now is a MUI up to 12 ability (12 units can cast it at the same time whoever the owner is)
Added Some Customization Features at the Cast Trigger (DMGdone and MAXdistance)
Removed the Bounce due bugs (help me to find the propper equation)
The Code!
Trigger:
- Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Meat Hook
- Actions
- Set Array = (Array + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Integer A) Equal to 13
- Then - Actions
- Set Array = 1
- Else - Actions
- If - Conditions
- Set Caster[Array] = (Casting unit)
- Set PointTarget[Array] = ((Target point of ability being cast) offset by 3000.00 towards (Angle from (Position of Caster[(Integer A)]) to (Target point of ability being cast)) degrees)
- Set PlayerBoolean[Array] = True
- Set TempPoint = (Position of Caster[Array])
- Set DMGdone[Array] = 100.00
- Set MAXDistance[Array] = 3000.00
- Unit - Create 1 Dummy2 for (Owner of Caster[Array]) at TempPoint facing (Angle from (Position of Caster[(Integer A)]) to PointTarget[(Integer A)]) degrees
- Set Dummy2[Array] = (Last created unit)
- Custom script: call RemoveLocation (udg_TempPoint)
- Events
Trigger:
- Slide
- Events
- Time - Every 0.05 seconds of game time
- Conditions
- Actions
- For each (Integer A) from 1 to Array, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- PlayerBoolean[(Integer A)] Equal to True
- Then - Actions
- Set Slide[(Integer A)] = (Slide[(Integer A)] + 1.00)
- Set TempPoint2 = (Position of Dummy[((((Integer A) x 100) - 100) + NumberDummy[(Integer A)])])
- Set TempPoint = (Position of Caster[(Integer A)])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- FirstDummy[(Integer A)] Equal to True
- (Distance between TempPoint and TempPoint2) Greater than or equal to 55.00
- Then - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Set TempPoint = (Position of Caster[(Integer A)])
- Unit - Create 1 Dummy for (Owner of Caster[(Integer A)]) at TempPoint facing (Angle from TempPoint to (Position of Dummy[((((Integer A) x 100) - 100) + NumberDummy[(Integer A)])])) degrees
- Custom script: call RemoveLocation (udg_TempPoint2)
- Set NumberDummy[(Integer A)] = (NumberDummy[(Integer A)] + 1)
- Set Dummy[((((Integer A) x 100) - 100) + NumberDummy[(Integer A)])] = (Last created unit)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- FirstDummy[(Integer A)] Equal to False
- Then - Actions
- Set TempPoint = (Position of Caster[(Integer A)])
- Unit - Create 1 Dummy for (Owner of Caster[(Integer A)]) at TempPoint facing (Angle from TempPoint to PointTarget[(Integer A)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Set NumberDummy[(Integer A)] = (NumberDummy[(Integer A)] + 1)
- Set Dummy[((((Integer A) x 100) - 100) + NumberDummy[(Integer A)])] = (Last created unit)
- Set FirstDummy[(Integer A)] = True
- Else - Actions
- If - Conditions
- For each (Integer B) from (((Integer A) x 100) - 99) to ((((Integer A) x 100) - 100) + NumberDummy[(Integer A)]), do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Dummy[(((Integer A) x 100) - 99)] Equal to Dummy[(Integer B)]
- Then - Actions
- Set TempPoint = ((Position of Dummy[(Integer B)]) offset by 20.00 towards (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees)
- Unit - Move Dummy[(Integer B)] instantly to TempPoint, facing (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Set TempPoint = ((Position of Dummy[(Integer B)]) offset by 20.00 towards (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees)
- Unit - Move Dummy2[(Integer A)] instantly to TempPoint, facing (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Else - Actions
- Set TempPoint = (Position of Dummy[(Integer B)])
- Set TempPoint2 = (Position of Dummy[((Integer B) - 1)])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between TempPoint and TempPoint2) Greater than or equal to 55.00
- Then - Actions
- Set TempPoint = ((Position of Dummy[((Integer B) - 1)]) offset by -55.00 towards (Angle from (Position of Dummy[(Integer B)]) to (Position of Dummy[((Integer B) - 1)])) degrees)
- Unit - Move Dummy[(Integer B)] instantly to TempPoint, facing (Angle from (Position of Dummy[(Integer B)]) to (Position of Dummy[((Integer B) - 1)])) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- -------- Set the max distance here --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Slide[(Integer A)] Greater than or equal to (MAXDistance[(Integer A)] / 20.00)
- Then - Actions
- Set PlayerBoolean[(Integer A)] = False
- Set AbilityBoolean[(Integer A)] = True
- Else - Actions
- If - Conditions
- Set TempPoint = (Position of Dummy[(((Integer A) x 100) - 99)])
- Set TempGroup = (Units within 120.00 of TempPoint matching (((Matching unit) Not equal to Caster[(Integer A)]) and (((Matching unit) is alive) Equal to True)))
- Custom script: call RemoveLocation (udg_TempPoint)
- -------- Set the damage done here --------
- 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
- ((Picked unit) belongs to an enemy of (Owner of Caster[(Integer A)])) Equal to True
- ((Picked unit) is A structure) Not equal to True
- Then - Actions
- Unit - Cause Caster[(Integer A)] to damage (Picked unit), dealing DMGdone[(Integer A)] damage of attack type Spells and damage type Normal
- Set Target[(Integer A)] = (Picked unit)
- Set AbilityBoolean[(Integer A)] = True
- Set PlayerBoolean[(Integer A)] = False
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup (udg_TempGroup)
- Set TempPoint = (Position of Dummy[(((Integer A) x 100) - 99)])
- Set TempGroup = (Units within 120.00 of TempPoint matching (((Matching unit) Not equal to Caster[(Integer A)]) and (((Matching unit) is alive) Equal to True)))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (TempGroup is empty) Equal to False
- AbilityBoolean[(Integer A)] Equal to True
- Then - Actions
- Set PointTarget[(Integer A)] = ((Position of Dummy[(((Integer A) x 100) - 99)]) offset by 3000.00 towards ((Angle from (Position of Dummy[(((Integer A) x 100) - 99)]) to (Position of (Picked unit))) x 1.00) degrees)
- Else - Actions
- If - Conditions
- Custom script: call DestroyGroup (udg_TempGroup)
- Custom script: call RemoveLocation (udg_TempPoint)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AbilityBoolean[(Integer A)] Equal to True
- Then - Actions
- For each (Integer B) from (((Integer A) x 100) - 99) to ((((Integer A) x 100) - 100) + 100), do (Actions)
- Loop - Actions
- Set TempPoint = (Position of Caster[(Integer A)])
- Set TempPoint2 = (Position of Dummy[(Integer B)])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between TempPoint and TempPoint2) Less than or equal to 50.00
- Then - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- Unit - Remove Dummy[(Integer B)] from the game
- Set NumberDummy[(Integer A)] = (NumberDummy[(Integer A)] - 1)
- Else - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Dummy[((((Integer A) x 100) - 100) + NumberDummy[(Integer A)])] Equal to Dummy[(Integer B)]
- Then - Actions
- Set TempPoint = ((Position of Dummy[(Integer B)]) offset by 20.00 towards (Angle from (Position of Dummy[(Integer B)]) to (Position of Caster[(Integer A)])) degrees)
- Unit - Move Dummy[(Integer B)] instantly to TempPoint, facing (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Dummy[((Integer B) + 1)] Equal to No unit
- Then - Actions
- Set TempPoint = ((Position of Dummy[(Integer B)]) offset by 20.00 towards (Angle from (Position of Dummy[(Integer B)]) to (Position of Caster[(Integer A)])) degrees)
- Else - Actions
- Set TempPoint = ((Position of Dummy[(Integer B)]) offset by 20.00 towards (Angle from (Position of Dummy[(Integer B)]) to (Position of Dummy[((Integer B) + 1)])) degrees)
- If - Conditions
- Unit - Move Dummy[(Integer B)] instantly to TempPoint, facing (Angle from (Position of Dummy[((Integer B) + 1)]) to (Position of Dummy[(Integer B)])) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Set TempPoint = (Position of Dummy[(((Integer A) x 100) - 99)])
- Unit - Move Dummy2[(Integer A)] instantly to TempPoint, facing (Facing of Dummy[(((Integer A) x 100) - 99)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- Set TempPoint = (Position of Dummy[(((Integer A) x 100) - 99)])
- Unit - Move Target[(Integer A)] instantly to TempPoint, facing (Angle from (Position of Dummy[(Integer B)]) to PointTarget[(Integer A)]) degrees
- Custom script: call RemoveLocation (udg_TempPoint)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If - Conditions
- Set TempPoint = (Position of Caster[(Integer A)])
- Set TempPoint2 = (Position of Dummy2[(Integer A)])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between TempPoint and TempPoint2) Less than or equal to 50.00
- Then - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- Unit - Remove Dummy2[(Integer A)] from the game
- Set Target[(Integer A)] = No unit
- Else - Actions
- Custom script: call RemoveLocation (udg_TempPoint)
- Custom script: call RemoveLocation (udg_TempPoint2)
- If - Conditions
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- NumberDummy[(Integer A)] Equal to 0
- Then - Actions
- Set AbilityBoolean[(Integer A)] = False
- Set Slide[(Integer A)] = 0.00
- Set NumberDummy[(Integer A)] = 0
- Set FirstDummy[(Integer A)] = False
- Else - Actions
- If - Conditions
- For each (Integer B) from (((Integer A) x 100) - 99) to ((((Integer A) x 100) - 100) + 100), do (Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to Array, do (Actions)
- Events