• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Looking over some spells..

Status
Not open for further replies.
Level 2
Joined
Aug 15, 2007
Messages
26
I need help looking over these spells, since I suspect their not working properly and almost certainly leaking? I'll download it into a map so you can test for yourself, but here are the triggers for the first spell:

Based on shockwave. I'm not certain if the damage-thing is working. Sometimes it hits several units more than once, I guess I could try fixing a unit group?

Anyways, damage is 0.25 str (0.50 str lvl 2, 0.75 str lvl 3) + 50 (100 lvl 2, 150 lvl 3 etc..)

  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Slam
    • Actions
      • Set SW_Dummy = 0
      • Set SW_Caster = (Triggering unit)
      • Set SW_loc1 = (Position of SW_Caster)
      • Set SW_Facing = (Facing of SW_Caster)
      • Set SW_loc2 = (SW_loc1 offset by 150.00 towards SW_Facing degrees)
      • Set SW_loc1 = SW_loc2
      • Set SW_loc2 = (SW_loc1 offset by 150.00 towards SW_Facing degrees)
      • Countdown Timer - Start SW_Timer as a Repeating timer that will expire in 0.10 seconds
I suspect some leak-fixing could be needed. Should I just put " Custom script: call RemoveLocation(udg_SW_loc1)
Custom script: call RemoveLocation(udg_SW_loc2)" on the end?

  • Untitled Trigger 003
    • Events
      • Time - SW_Timer expires
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for (Owner of SW_Caster) at SW_loc1 facing SW_Facing degrees
      • Special Effect - Create a special effect at SW_loc1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Last created unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of SW_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Unit - Cause SW_Caster to damage (Picked unit), dealing (((Real((Strength of SW_Caster (Exclude bonuses)))) x 0.25) + (50.00 + (Real((Level of Dummy Slam for SW_Caster))))) damage of attack type Spells and damage type Normal)
      • Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
      • Set SW_loc1 = SW_loc2
      • Set SW_loc2 = (SW_loc1 offset by 150.00 towards SW_Facing degrees)
      • Set SW_Dummy = (SW_Dummy + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SW_Dummy Equal to 6
        • Then - Actions
          • Countdown Timer - Pause SW_Timer
        • Else - Actions
      • Wait 2.00 seconds
      • Custom script: call RemoveLocation(udg_SW_loc1)
      • Custom script: call RemoveLocation(udg_SW_loc2)
Have no idea if the leakfixes work properly, but the spell doesn't lag though.

And the second spell:

When activated (based on bloodlust, target only self) the hero gains a kind of crit based on his str. (lvl 1 .25 str lvl 2 .50 str etc). It seems to be working fine, just want to be sure.

  • Face to Face
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Face to Face ) Equal to True
      • (Random integer number between 1 and 100) Less than 15
    • Actions
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing ((Real((Strength of (Attacking unit) (Exclude bonuses)))) x (0.25 x (Real((Level of Face to Face for (Attacking unit)))))) damage of attack type Hero and damage type Normal
      • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • Special Effect - Destroy (Last created special effect)
      • Trigger - Turn off (This trigger)
      • Wait 0.60 game-time seconds
      • Trigger - Turn on (This trigger)
I could upload a better testmap later, with spell discriptions, but now I've gotta eat.. Thanks for any help!
 

Attachments

  • SloppyTestMap.w3x
    26 KB · Views: 46
Last edited:
Level 9
Joined
Feb 19, 2006
Messages
115
The second spell is fine, but try this for the first one...

  • Untitled Trigger 002
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Slam
    • Actions
      • Set SW_Dummy = 0
      • Set SW_Caster = (Triggering unit)
      • Set SW_loc1 = (Position of SW_Caster)
      • Set SW_Facing = (Facing of SW_Caster)
      • Set SW_loc2 = (SW_loc1 offset by 150.00 towards SW_Facing degrees)
      • Custom script: call RemoveLocation(udg_SW_loc1)
      • Custom script: set udg_SW_loc1 = Location(GetLocationX(udg_SW_loc2),GetLocationY(udg_SW_loc2))
      • Custom script: call RemoveLocation(udg_SW_loc2)
      • Set SW_loc2 = SW_loc1
      • Countdown Timer - Start SW_Timer as a Repeating timer that will expire in 0.10 seconds
  • Untitled Trigger 003
    • Events
      • Time - SW_Timer expires
    • Conditions
    • Actions
      • Special Effect - Create a special effect at SW_loc1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 150.00 of SW_loc1 matching ...
      • Custom script: call RemoveLocation(udg_SW_loc1)
      • Custom script: set udg_SW_loc1 = Location(GetLocationX(udg_SW_loc2),GetLocationY(udg_SW_loc2))
      • Custom script: call RemoveLocation(udg_SW_loc2)
      • Set SW_loc2 = (SW_loc1 offset by 150.00 towards SW_Facing degrees)
      • Set SW_Dummy = (SW_Dummy + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SW_Dummy Equal to 6
        • Then - Actions
          • Countdown Timer - Pause SW_Timer
          • Custom script: call RemoveLocation(udg_SW_loc1)
          • Custom script: call RemoveLocation(udg_SW_loc2)
        • Else - Actions
I have no idea what your dummy unit was for, so I just got rid of it. Also, you might want to use a for-loop instead of a timer, so it only fills one trigger, and doesn't use a timer variable...

  • Untitled Trigger 004
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Slam
    • Actions
      • Set SW_Caster = (Triggering unit)
      • Set SW_loc2 = (Position of SW_Caster)
      • Set SW_Facing = (Facing of SW_Caster)
      • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
      • Custom script: call RemoveLocation(udg_SW_loc2)
      • For each (Integer TempInteger) from 1 to 6, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at SW_loc1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 150.00 of SW_loc1 matching...
          • Custom script: set udg_SW_loc2 = Location(GetLocationX(udg_SW_loc1),GetLocationY(udg_SW_loc1))
          • Custom script: call RemoveLocation(udg_SW_loc1)
          • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
          • Custom script: call RemoveLocation(udg_SW_loc2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempInteger Equal to 6
            • Then - Actions
              • Custom script: call RemoveLocation(udg_SW_loc1)
              • Custom script: call RemoveLocation(udg_SW_loc2)
            • Else - Actions
          • Wait 0.10 seconds
Hope this helps ^_^
 
Level 2
Joined
Aug 15, 2007
Messages
26
Okey, so I did your trigger. Kinda nice having it as one trigger. Thanks, but now I have another problem. The doesn't deal damage. I'm not sure why, but maybe we're removing locations too soon? :p

  • Untitled Trigger 002 Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Slam
    • Actions
      • Set SW_Caster = (Triggering unit)
      • Set SW_loc2 = (Position of SW_Caster)
      • Set SW_Facing = (Facing of SW_Caster)
      • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
      • Custom script: call RemoveLocation(udg_SW_loc2)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at SW_loc1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Last created unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of SW_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Unit - Cause SW_Caster to damage (Picked unit), dealing (((Real((Strength of SW_Caster (Exclude bonuses)))) x 0.25) + (50.00 x (Real((Level of Dummy Slam for SW_Caster))))) damage of attack type Spells and damage type Normal)
          • Custom script: set udg_SW_loc2 = Location(GetLocationX(udg_SW_loc1),GetLocationY(udg_SW_loc1))
          • Custom script: call RemoveLocation(udg_SW_loc1)
          • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
          • Custom script: call RemoveLocation(udg_SW_loc2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SW_Dummy Equal to 6
            • Then - Actions
              • Custom script: call RemoveLocation(udg_SW_loc1)
              • Custom script: call RemoveLocation(udg_SW_loc2)
            • Else - Actions
          • Wait 0.10 seconds
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
(((Real((Strength of SW_Caster (Exclude bonuses)))) x 0.25) + (50.00 x (Real((Level of Dummy Slam for SW_Caster)))))
lets calculate - if the strength was 100, the attack did 25 damage plus at least 50 damage for the spell's level.
So if the strength was 1 it did 50.25 damage.
the problem lies within (Units within 150.00 of (Position of (Last created unit)) becasue the trigger shows no "last created unit" i suppose ;)
 
Level 2
Joined
Aug 15, 2007
Messages
26
(((Real((Strength of SW_Caster (Exclude bonuses)))) x 0.25) + (50.00 x (Real((Level of Dummy Slam for SW_Caster)))))
lets calculate - if the strength was 100, the attack did 25 damage plus at least 50 damage for the spell's level.
So if the strength was 1 it did 50.25 damage.
the problem lies within (Units within 150.00 of (Position of (Last created unit)) becasue the trigger shows no "last created unit" i suppose ;)

Of course, thats what the dummy was for :p

Here the final working trigger. Thanks for all help, I'm afraid I have to help some people before repping you :p

  • Untitled Trigger 002 Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dummy Slam
    • Actions
      • Set SW_Caster = (Triggering unit)
      • Set SW_loc2 = (Position of SW_Caster)
      • Set SW_Facing = (Facing of SW_Caster)
      • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
      • Custom script: call RemoveLocation(udg_SW_loc2)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at SW_loc1 using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 150.00 of (SW_loc1 offset by (0.00, 0.00)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of SW_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Unit - Cause SW_Caster to damage (Picked unit), dealing (((Real((Strength of SW_Caster (Exclude bonuses)))) x 0.35) + (50.00 x (Real((Level of Dummy Slam for SW_Caster))))) damage of attack type Spells and damage type Normal)
          • Custom script: set udg_SW_loc2 = Location(GetLocationX(udg_SW_loc1),GetLocationY(udg_SW_loc1))
          • Custom script: call RemoveLocation(udg_SW_loc1)
          • Set SW_loc1 = (SW_loc2 offset by 150.00 towards SW_Facing degrees)
          • Custom script: call RemoveLocation(udg_SW_loc2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SW_Dummy Equal to 6
            • Then - Actions
              • Custom script: call RemoveLocation(udg_SW_loc1)
              • Custom script: call RemoveLocation(udg_SW_loc2)
            • Else - Actions
          • Wait 0.10 seconds
 
Level 9
Joined
Feb 19, 2006
Messages
115
get rid of "SW_loc1 offset by (0.00, 0.00)" in your unit group function,and change it to "SW_loc1". Offset returns a location, which is leaked, and won't really do anything, but it might screw up the the damaging a little.
 
Status
Not open for further replies.
Top