• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Splitting Glaive Bomb v1.4

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
SPELL DESCRIPTION
Throws a bloody glaive towards the targeted point and flies with the speed of 660 range per second until its duration is ended or hit any enemy units. The glaive will explode upon impact and deals damage to 300 AOE. Then, the glaive will split into 2 parts which will continue to fly with each respective angle and flying path. The parts will not explode upon impact or dies, but instead will cut any enemy units in contact with its razor-sharped edge. The parts' effect will be half from its original glaive such as reduced to half for search area, duration and speed.

Level 1 - 100 damage upon impact. 0.75 seconds duration. 99 damage per second for Mini Glaive.

Level 2 - 200 damage upon impact. 1.5 seconds duration. 198 damage per second for Mini Glaive.

Level 3 - 300 damage upon impact. 2.25 seconds duration. 297 damage per second for Mini Glaive.

Level 4 - 400 damage upon impact. 3.00 seconds duration. 396 damage per second for Mini Glaive.
TRIGGERS
  • Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Hashtable = (Last created hashtable)
      • -------- CONFIGURABLE DATA --------
      • -------- "Base" means, the spell effect at Level 1. --------
      • -------- After the calculation, we will get the real data, example: BaseDamage = 100, at Level 2, this will be... BaseDamage = ? Yes, 200 ! --------
      • -------- Bomb Damage at Level 1 --------
      • Set BaseBombDamage = 100.00
      • -------- Duration of the Glaive at Level 1 --------
      • Set BaseGlaiveDuration = 0.75
      • -------- Damage done the enemy done by the splitting parts of the glaive at level 1 --------
      • Set BaseMiniGlaiveCutDamage = 3.00
      • -------- Self-explanatory --------
      • Set GlaiveSpeed = 20.00
      • -------- Since all effect will be reduced to half from Glaive to Splitting Parts, it will be reduced by 2 --------
      • Set MiniGlaiveSpeed = (GlaiveSpeed / 2.00)
      • -------- Area search for Mini Glaive to cut the enemy --------
      • Set CutDamageAOE = 75.00
      • -------- Search units within XXX range of Glaive --------
      • Set GlaiveDieRange = 150.00
      • -------- This is for Mini Glaive appearing after Glaive is dead --------
      • Set MiniGlaiveFacingAngle = 45.00
      • -------- Since all effect will be reduced to half from Glaive to Splitting Parts, it will be reduced by 2 --------
      • Set BaseMiniGlaiveDuration = (BaseGlaiveDuration / 2.00)
      • -------- AOE of the bomb caused by Glaive --------
      • Set BombAOE = 300.00
      • -------- Set the Ability into a variable for proper loading into another trigger --------
      • Set Ability = Splitting Glaive Bomb
      • -------- Setting the SFX path (this is the "bloody" effect attached to those glaives --------
      • Set SFX = Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ability
    • Actions
      • -------- We now set variables --------
      • -------- Setting variables that relies on level, basically Level 1 deals 100 damage, Level 2 deals 200 damage... and so on --------
      • Set Caster = (Triggering unit)
      • Set AbilityLevel = (Level of Splitting Glaive Bomb for Caster)
      • Set BombDamage = (BaseBombDamage x (Real(AbilityLevel)))
      • Set GlaiveDuration = (BaseGlaiveDuration x (Real(AbilityLevel)))
      • Set MiniGlaiveCutDamage = (BaseMiniGlaiveCutDamage x (Real(AbilityLevel)))
      • Set MiniGlaiveDuration = (BaseMiniGlaiveDuration x (Real(AbilityLevel)))
      • -------- Setting these 2 locations (CasterLoc and TargetLoc) will give us Angle for easier moving the Glaive with correct angle --------
      • Set CasterLoc = (Position of Caster)
      • Set TargetLoc = (Target point of ability being cast)
      • Set Angle = (Angle from CasterLoc to TargetLoc)
      • -------- Dum-dum-dum ! Here comes the Glaive --------
      • Unit - Create 1 Glaive for (Triggering player) at CasterLoc facing Default building facing degrees
      • -------- Setting a variable for the Handle ID --------
      • Set Glaive = (Last created unit)
      • Set ID = (Key (Last created unit))
      • -------- Its lifespan depending on the level of the ability --------
      • Unit - Add a GlaiveDuration second Generic expiration timer to Glaive
      • -------- Add that Glaive to a Unit Group for moving it --------
      • Unit Group - Add Glaive to GlaiveGroup
      • -------- Saving all data in hashtable for future use --------
      • Hashtable - Save Angle as (Key Angle) of ID in Hashtable
      • Hashtable - Save BombDamage as (Key BombDamage) of ID in Hashtable
      • Hashtable - Save MiniGlaiveDuration as (Key MiniGlaiveDuration) of ID in Hashtable
      • -------- If the Loop is not turned on, it will be turned on by executing the IF/THEN/ELSE function --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Loop <gen> is on) Equal to True
        • Then - Actions
        • Else - Actions
          • Trigger - Turn on Loop <gen>
      • -------- Cleaning leaks ! --------
      • Custom script: call RemoveLocation(udg_CasterLoc)
      • Custom script: call RemoveLocation(udg_TargetLoc)
  • Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- This is for Glaive to move around and do its job --------
      • Unit Group - Pick every unit in GlaiveGroup and do (Actions)
        • Loop - Actions
          • -------- Load the Handle ID --------
          • Set ID = (Key (Picked unit))
          • Set Glaive = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Glaive is alive) Equal to True
            • Then - Actions
              • -------- Here we are, load the saved data from the hashtable in "Cast" trigger just now --------
              • Set Angle = (Load (Key Angle) of ID from Hashtable)
              • -------- Setting up variables (for easier referrences) --------
              • -------- We must set new location everytime the unit moves --------
              • Set GlaiveLoc = (Position of Glaive)
              • -------- If the Glaive is out of the map, it instantly dies and explode (prevent fatal error to the map) --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Playable map area) contains GlaiveLoc) Equal to True
                • Then - Actions
                  • -------- This is to move the Glaive --------
                  • Set GlaiveMoveLoc = (GlaiveLoc offset by GlaiveSpeed towards Angle degrees)
                  • Special Effect - Create a special effect at GlaiveMoveLoc using SFX
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call SetUnitX(udg_Glaive,GetLocationX(udg_GlaiveMoveLoc) )
                  • Custom script: call SetUnitY(udg_Glaive,GetLocationY(udg_GlaiveMoveLoc) )
                  • -------- Cleaning Unit Group action leaks action --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • -------- Keep picking units around the Glaive, if the picked hits the following conditions, it kills the Glaive --------
                  • Unit Group - Pick every unit in (Units within GlaiveDieRange of GlaiveMoveLoc) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) belongs to an enemy of (Owner of Glaive)) Equal to True
                        • Then - Actions
                          • Unit - Kill Glaive
                        • Else - Actions
                  • -------- Clean leaks --------
                  • Custom script: call RemoveLocation(udg_GlaiveMoveLoc)
                • Else - Actions
                  • Unit - Kill Glaive
              • Custom script: call RemoveLocation(udg_GlaiveLoc)
            • Else - Actions
      • -------- This is for Mini Glaive to move around and do its job --------
      • Unit Group - Pick every unit in MiniGlaiveGroup and do (Actions)
        • Loop - Actions
          • -------- Load the Handle ID --------
          • Set ID2[1] = (Key (Picked unit))
          • Set ID2[2] = (Key (Picked unit))
          • Set MiniGlaive = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MiniGlaive is alive) Equal to True
            • Then - Actions
              • -------- This data is saved from "Glaive Die" trigger --------
              • Set MiniGlaiveCutDamage = (Load (Key MiniGlaiveCutDamage) of ID2[1] from Hashtable)
              • Set MiniGlaiveCutDamage = (Load (Key MiniGlaiveCutDamage) of ID2[2] from Hashtable)
              • -------- I have explained the same thing in Unit Group GlaiveGroup action --------
              • Set MiniGlaiveLoc = (Position of MiniGlaive)
              • -------- Same function of preventing the fatal error --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Playable map area) contains MiniGlaiveLoc) Equal to True
                • Then - Actions
                  • Set MiniGlaiveMovingLoc = (MiniGlaiveLoc offset by MiniGlaiveSpeed towards (Facing of MiniGlaive) degrees)
                  • Special Effect - Create a special effect at MiniGlaiveMovingLoc using SFX
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call SetUnitX(udg_MiniGlaive,GetLocationX(udg_MiniGlaiveMovingLoc) )
                  • Custom script: call SetUnitY(udg_MiniGlaive,GetLocationY(udg_MiniGlaiveMovingLoc) )
                  • Custom script: set bj_wantDestroyGroup = true
                  • -------- This is to damage the affected units around Mini Glaive for 0.03 second per damage --------
                  • Unit Group - Pick every unit in (Units within CutDamageAOE of MiniGlaiveMovingLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of MiniGlaive)) Equal to True))) and do (Actions)
                    • Loop - Actions
                      • Set PickedUnit = (Picked unit)
                      • Special Effect - Create a special effect attached to the chest of PickedUnit using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause MiniGlaive to damage PickedUnit, dealing MiniGlaiveCutDamage damage of attack type Spells and damage type Normal
                  • -------- Clean leaks --------
                  • Custom script: call RemoveLocation(udg_MiniGlaiveMovingLoc)
                • Else - Actions
                  • Unit - Kill MiniGlaive
              • Custom script: call RemoveLocation(udg_MiniGlaiveLoc)
            • Else - Actions
              • -------- If Mini Glaive is dead, clean its hashtable data --------
              • Hashtable - Clear all child hashtables of child ID2[1] in Hashtable
              • Hashtable - Clear all child hashtables of child ID2[2] in Hashtable
              • -------- If the Unit Group is empty in MiniGlaiveGroup, this trigger will be turned off, thus, saving game's performance --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (MiniGlaiveGroup is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
  • Glaive Die
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in GlaiveGroup) Equal to True
    • Actions
      • -------- This is the event where the Glaive is dead --------
      • -------- Setting these into variables will save a lot of time to not calling the same function --------
      • Set PlayerOwner = (Triggering player)
      • Set ID = (Key (Triggering unit))
      • Set DyingUnit = (Triggering unit)
      • -------- Load saved data in "Cast" trigger --------
      • Set Angle = (Load (Key Angle) of ID from Hashtable)
      • Set BombDamage = (Load (Key BombDamage) of ID from Hashtable)
      • Set MiniGlaiveDuration = (Load (Key MiniGlaiveDuration) of ID from Hashtable)
      • -------- Setting up variable for position of the dying unit (for "exploding" SFX) --------
      • Set DyingLoc = (Position of DyingUnit)
      • Special Effect - Create a special effect at DyingLoc using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • -------- DAMAGE THOSE ENEMIES !!! --------
      • Unit Group - Pick every unit in (Units within BombAOE of DyingLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set PickedUnit = (Picked unit)
          • Unit - Cause DyingUnit to damage PickedUnit, dealing BombDamage damage of attack type Spells and damage type Normal
      • -------- Creating Mini Glaive after Glaive dies --------
      • -------- These 2 Mini Glaive is created for the same function, only changed is, its Angle :) --------
      • Unit - Create 1 Glaive for PlayerOwner at DyingLoc facing (Angle + MiniGlaiveFacingAngle) degrees
      • Set MiniGlaive = (Last created unit)
      • Set ID2[1] = (Key (Last created unit))
      • Animation - Change MiniGlaive's size to (50.00%, 50.00%, 50.00%) of its original size
      • Unit - Add a MiniGlaiveDuration second Generic expiration timer to MiniGlaive
      • Unit Group - Add MiniGlaive to MiniGlaiveGroup
      • Hashtable - Save MiniGlaiveCutDamage as (Key MiniGlaiveCutDamage) of ID2[1] in Hashtable
      • Unit - Create 1 Glaive for PlayerOwner at DyingLoc facing (Angle - MiniGlaiveFacingAngle) degrees
      • Set MiniGlaive = (Last created unit)
      • Set ID2[2] = (Key (Last created unit))
      • Animation - Change MiniGlaive's size to (50.00%, 50.00%, 50.00%) of its original size
      • Unit - Add a MiniGlaiveDuration second Generic expiration timer to MiniGlaive
      • Unit Group - Add MiniGlaive to MiniGlaiveGroup
      • Hashtable - Save MiniGlaiveCutDamage as (Key MiniGlaiveCutDamage) of ID2[2] in Hashtable
      • -------- Cleaning the child of hashtable of the Glaive (dead unit) --------
      • Hashtable - Clear all child hashtables of child ID in Hashtable
      • Custom script: call RemoveLocation(udg_DyingLoc)
CHANGELOGS
v 1.0
- Initial release

v1.1
- Fixed the "constantly calling same function" issue (credits to Magtheridon96)

v1.2
- Fixed usage of Handle ID
- Fixed tooltips color problem
- Fixed constantly calling same function for level of the ability
- Fixed ability usage
- Uses only 1 unit-type (for small glaive, I just reduced its size)
- Uses proper And - Condition
- Uses only 1 call function of (Triggering player)
- SFX now can be configured by setting its path


v1.3
- Uses SetUnitX , SetUnitY function

v1.4
- Fixed fatal error/heavy fps drop if the glaive/mini-glaive is outside the map Fixed

Keywords:
hashtable, defskull, splitting, glaive, bomb, glaive, exploding, drag, blood, 2, parts.
Contents

Splitting Glaive Bomb v1.4 (Map)

Reviews
12.12 IcemanBo: For long time as NeedsFix. Rejected. Bribe ((Playable map area) contains GlaiveLoc) Equal to true -> That's a really smart idea and a pretty quick native lookup as well. Nice find! You check if the MiniGlaive group is...

Moderator

M

Moderator

12.12
IcemanBo: For long time as NeedsFix. Rejected.

Bribe

((Playable map area) contains GlaiveLoc) Equal to true

-> That's a really smart idea and a pretty quick native lookup as well. Nice find!

You check if the MiniGlaive group is empty from <within> the group-enum... this check should be moved to outside of the group-enum part because you can't pick any units from an empty group... see the dilemma?

Set ID2[1] = (Key (Picked unit))
Set ID2[2] = (Key (Picked unit))

-> What's going on here? You reference the same unit twice for two different variables?

Set MiniGlaiveCutDamage = (Load (Key MiniGlaiveCutDamage) of ID2[1] from Hashtable)
Set MiniGlaiveCutDamage = (Load (Key MiniGlaiveCutDamage) of ID2[2] from Hashtable)

-> This looks like trouble
 
Level 5
Joined
May 27, 2009
Messages
94
I think he meant that in your cast trigger, you do the rest of the calculation and he would like it not to be loaded through that soo you'd rather put it all into the cast trigger(to prevent bugs with hashtables) and then combined the 100 * level of ability being cast in the cast trigger.
 
What if a user wants to do, 1000,1250,1500 etc damage? its not possible with your settings which only used a single variable for damage...

instead of using only a Base damage, you might want to add a Damage Increase Per Level so that its easier to change...

or do what Axarion said, use an array... Though I personally think its a waste of performance to use an array for that...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Set BombDamage = (BaseBombDamage x (Real((Level of Splitting Glaive Bomb for (Triggering unit)))))
Level 1 - 100 damage
Level 2 - 200 damage
Level 3 - 300 damage
Level 4 - 400 damage

???

There is 2 method for calculating formula, one is direct multiplication of damage
In my map, I used that method
1 * 1 = 100
1 * 2 = 200
And so on...

For 1000, 1250, 1500, it uses both Plus and Multiplication calculation Method
Its base damage would be 750
It's interval damage per level would be 250
So:
BaseDamage + (IntervalDamagePerLevel * Current level of ability XXX for (Triggering unit)

Get it ?
I just use the first method, I'd like it that way, LOL








"What if the user wants to do, 100,200,300 etc damage?"
 
Shouldn't you use Map Initialization instead of "Time - Elapsed game time is 0.00 seconds"

Also, you're constantly calling the function (Triggering Unit)
It's better if you store the triggering unit in a variable for efficiency
Same thing goes for (Last Created Unit)

Efficiency is critical (Always keep that in mind)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I don't see the problem with the Event of Map INIT and Time, so let's just keep it that way, okay ? :)

For constantly calling functions, I'll do something about it, thanks :)

When I see your avatar Magtheridon, I always thought it as a... SNAIL, lol


WAIT:
Also, you're constantly calling the function (Triggering Unit)
It's better if you store the triggering unit in a variable for efficiency
Same thing goes for (Last Created Unit)
How to do this... ?
 
-____-
Are you the guy with the Spell Workshop thing xD

Create a new unit variable and set it to (Triggering Unit) --- (For evertime you use triggering unit)
Create another unit variable and set it to (Last Created Unit) whenever you repeat it.

For example:

  • Set BombDamage = (BaseBombDamage x (Real((Level of Splitting Glaive Bomb for (Triggering unit)))))
    • Set GlaiveDuration = (BaseGlaiveDuration x (Real((Level of Splitting Glaive Bomb for (Triggering unit)))))
    • Set MiniGlaiveCutDamage = (BaseMiniGlaiveCutDamage x (Real((Level of Splitting Glaive Bomb for (Triggering unit)))))
    • Set MiniGlaiveDuration = (BaseMiniGlaiveDuration x (Real((Level of Splitting Glaive Bomb for (Triggering unit)))))
    • -------- Setting these 2 locations (CasterLoc and TargetLoc) will give us Angle for easier moving the Glaive with correct angle --------
    • Set CasterLoc = (Position of (Triggering unit))
Over here, you used Triggering Unit more than once.
You should use a unit variable that is set to (Triggering unit)
instead of constantly using the (Triggering Unit) function.

This way, your trigger doesn't have to constantly process
what is the triggering unit because it will be stored in a
variable.

I hope this helped :)

And btw, there's almost no difference when you use Map init or
Time - 0.00 seconds, but Map init is more commonly used.

I don't see how you could mistake kenny for a snail :p
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
better...

  • Unit Group - Pick every unit in GlaiveGroup and do (Actions)
    • Loop - Actions
      • Set Glaive = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Glaive) is alive) Equal to True
and use...

add 0.01 expiring for glaive
make Glaive explode

instead of >>> Unit - Kill Glaive

and where is BombAOE?...

and use ID as integer to reference those keys...ex. last created unit and picked unit
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The issue has been fixed :)


better...

Unit Group - Pick every unit in GlaiveGroup and do (Actions)
Loop - Actions
Set Glaive = (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Glaive) is alive) Equal to True
Already fixed it

add 0.01 expiring for glaive
make Glaive explode

instead of >>> Unit - Kill Glaive
I didn't kill the Glaive, its lifespan is based on Current Glaive Lifespan divided (/) by 2 = Mini Glaive Lifespan

and where is BombAOE?...
In the "Setup" trigger, at the bottom

and use ID as integer to reference those keys...ex. last created unit and picked unit
I've been trying to do this, but ever since, I phailed -.-''
Can show me the correct ways ?
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
This is the correct way...

  • Unit - Create 1 Glaive for (Triggering player) at CasterLoc facing Default building facing degrees
  • Set Glaive = (Last created unit)
  • Set ID = Key(Last Created Unit)
  • Loop
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
  • ------- This is for Glaive to move around and do its job --------
    • Unit Group - Pick every unit in GlaiveGroup and do (Actions)
    • Loop - Actions
      • Set ID = Key(Picked Unit)
      • Set Glaive = (Picked unit)
it will SAVE you a lot of time...

EDIT:
Im so blind I did not see the BomAOE = 300, bwahaha!!!
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The triggering is quite good. No leaks, is MUI. It seems you've done your lessons and have learned creating MUI spells with hashtables.

The [Level] texts in tooltip are missing colour code.
The tooltip learn and learned positions should match.
Glave Die trigger should be turned on/off. No need to have it on when there are no dummies around.
You could store the level of ability into a variable (maybe converted to a real) in the cast trigger since you're calling the function four times.
You could set the ability into a variable in the init trigger. Use the variable for the condition and for getting damage/duration.
You could remove the mini glaive unit type and just create normal glaive and scale it with a trigger.
Remove the and:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Picked unit) is alive) Equal to True
          • ((Picked unit) belongs to an enemy of (Owner of Glaive)) Equal to True
->
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Picked unit) is alive) Equal to True
      • ((Picked unit) belongs to an enemy of (Owner of Glaive)) Equal to True
Set the special effects into variables that you configure in the init trigger.
In the dying trigger, you could save triggerin player into a variable and use the variable.
You could cut down the amount of variables. You don't need casterLoc, dyingLoc, glaiveLoc, thisandthatLoc. Just use Loc1, Loc2...You have 7 point type variables but you only need two. Check the real and unit variables also.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
  • Unit - Create 1 Glaive for (Triggering player) at CasterLoc facing Default building facing degrees
  • Set Glaive = (Last created unit)
  • Set ID = Key(Last Created Unit)
Wouldn't it be faster to do Set ID = Key(Glaive)? If that's possible :p

I hate hashtables, so i try to avoid learning about them (A dark.. dark past :p)

I think you cant do it in GUI...
but this...
  • Custom Script: set udg_ID = GetHandleId(udg_Glaive)
 
Level 23
Joined
Jan 1, 2011
Messages
1,504
What if a user wants to do, 1000,1250,1500 etc damage? its not possible with your settings which only used a single variable for damage...

instead of using only a Base damage, you might want to add a Damage Increase Per Level so that its easier to change...

or do what Axarion said, use an array... Though I personally think its a waste of performance to use an array for that...

No you can do this one variable easilly it would be:

750 + (250 x Level of ability being cast)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
And if I use his "Plus and Multiplication" method, what would you comment on this:

"What if the user wants 100,200,300,400 damage?"

You too, have to modify it by yourself to adjust a suitable formula, am I right... ?

So, in all, there are 2 methods of damaging formula, so, it's up to the user itself to configure it

(It's that simple, really, no need to argue over a small thing)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
The [Level] texts in tooltip are missing colour code.
Fixed

The tooltip learn and learned positions should match.
What do you meant by this ?
Learn and Learned position is (x , y) = (3 , 0), both at the same position
Since I have disabled "Attack" ability in this test map, I could use that slot for my spell position, lol (just to make it look "compact")

Glave Die trigger should be turned on/off. No need to have it on when there are no dummies around.
Since this part of a trigger doesn't have the "looping check once every X seconds", I think that it doesn't even bother the game's performance (such as dropping FPS, lags, or delays)
It's quite good for now I think

You could store the level of ability into a variable (maybe converted to a real) in the cast trigger since you're calling the function four times.
Fixed

You could set the ability into a variable in the init trigger. Use the variable for the condition and for getting damage/duration.
Fixed

You could remove the mini glaive unit type and just create normal glaive and scale it with a trigger.
LOL never thought of that, thanks :)

Remove the and:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • And - All (Conditions) are true
    • Conditions
    • ((Picked unit) is alive) Equal to True
    • ((Picked unit) belongs to an enemy of (Owner of Glaive)) Equal to True
->
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • ((Picked unit) is alive) Equal to True
    • ((Picked unit) belongs to an enemy of (Owner of Glaive)) Equal to True
Fixed

Set the special effects into variables that you configure in the init trigger.
Fixed

In the dying trigger, you could save triggerin player into a variable and use the variable.
Fixed

You could cut down the amount of variables. You don't need casterLoc, dyingLoc, glaiveLoc, thisandthatLoc. Just use Loc1, Loc2...You have 7 point type variables but you only need two. Check the real and unit variables also.
I agree cutting down amount of variables (only for Point-type) but I don't agree cutting down Real/Integer type since they are use as example to others
Perhaps like: Damage and Duration is 2 different thing, we can't mess them up together
I know by using array can save a lot of useless variables but like I said, it's too hard to understand if we just use it like this:
Real[1] = 100
Real[2] = 0.75
It doesn't make sense does it ?
Although it could be explained by "Comment" action, but I'd like to keep it that way, for easier understanding (not having to look here and there just to remember what array value should be put in)
(Cutting down usage amount of Point-variable will be done on next version)
 
And if I use his "Plus and Multiplication" method, what would you comment on this:

"What if the user wants 100,200,300,400 damage?"

You too, have to modify it by yourself to adjust a suitable formula, am I right... ?

So, in all, there are 2 methods of damaging formula, so, it's up to the user itself to configure it

(It's that simple, really, no need to argue over a small thing)

Set base damage to 0 and DPL to 100... anyway, its just for easier editing for the less experienced users... haha...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
That is because the usage of SetunitX , SetUnitY will go beyond map range (will cause the map to fatal error if it's too edge of the map)
You can use "Unit - Move unit (instantly)" for not making it fatal error (instead, the glaive will fly alongside the edge of the map)
But... people around here told me that the usage of SetUnit > Unit - Move unit (instantly), so, what the heck
If I changed back to "Unit - Move unit (instantly)", people once again will start complaining
Well, nothing is perfect, right Garfield ?
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
That is because the usage of SetunitX , SetUnitY will go beyond map range (will cause the map to fatal error if it's too edge of the map)
You can use "Unit - Move unit (instantly)" for not making it fatal error (instead, the glaive will fly alongside the edge of the map)
But... people around here told me that the usage of SetUnit > Unit - Move unit (instantly), so, what the heck
If I changed back to "Unit - Move unit (instantly)", people once again will start complaining
Well, nothing is perfect, right Garfield ?
You could check if the point towards which glaive moves is within Playable map area; if it isn't, then don't perform the movement.
  • ((Playable map area) contains GlaiveMoveLoc Equal to True
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I feel like I wanna revert back to "Unit - Move unit (instantly" LOLLLLL
Well, you could do a check like that, but instead, it's weird you suddenly see a glaive, stuck at edge of the map (movement trigger has been disabled for that glaive)
It is better with Move Unit Instantly, lol
Well, never mind, I'll kill the glaive if it detects is not in playable map area any longer
Hit Wall = Die
But, well, I'll fix this on next version
Stay Tuned !
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
- Add
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Playable map area) contains GlaiveMoveLoc) Equal to True
    • Then - Actions
      • Custom script: call SetUnitX(udg_Glaive,GetLocationX(udg_GlaiveMoveLoc) )
      • Custom script: call SetUnitY(udg_Glaive,GetLocationY(udg_GlaiveMoveLoc) )
    • Else - Actions
and
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Playable map area) contains MiniGlaiveMovingLoc) Equal to True
    • Then - Actions
      • Custom script: call SetUnitX(udg_MiniGlaive,GetLocationX(udg_MiniGlaiveMovingLoc) )
      • Custom script: call SetUnitY(udg_MiniGlaive,GetLocationY(udg_MiniGlaiveMovingLoc) )
    • Else - Actions
- ???
- PROFIT!!1!eleven!!1

Or you could, on else actions, run glaive annihilation.
 
Top