• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] spell doesent work dummy unit issue

Status
Not open for further replies.
Level 15
Joined
Jul 9, 2008
Messages
1,552
my spell isent working the dummy units are not created i cant see why not

  • CG Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [C]hilling Ground
    • Actions
      • Set Caster = (Triggering unit)
      • Set AbilityLevel = (Level of [C]hilling Ground for Caster)
      • Set TargetLoc = (Target point of ability being cast)
      • Set AoeCG = 400
      • Set interval = 1
      • Set Duration = 5
      • Hashtable - Save Handle OfCaster as (Key caster) of (Key (Triggering unit)) in (Last created hashtable)
      • Unit Group - Add Caster to CG_Casters
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (Real(AoeCG)) of TargetLoc matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set PickedUnit = (Picked unit)
          • Custom script: set udg_HandleID = GetHandleId(udg_PickedUnit)
          • Set PickedLoc = (Position of PickedUnit)
          • Hashtable - Save Duration as (Key Duration) of HandleID in HashtableCG
          • Hashtable - Save interval as (Key interval) of HandleID in HashtableCG
          • Hashtable - Save AbilityLevel as (Key level) of HandleID in HashtableCG
          • Special Effect - Create a special effect attached to the origin of PickedUnit using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit Group - Add PickedUnit to UnitGroupCG
          • Custom script: call RemoveLocation(udg_PickedLoc)
      • Trigger - Turn on CG Loop <gen>
      • Custom script: call RemoveLocation(udg_TargetLoc)

  • CG Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CG_Casters and do (Actions)
        • Loop - Actions
          • Set Caster = (Load (Key level) of (Key (Picked unit)) in (Last created hashtable))
      • Unit Group - Pick every unit in UnitGroupCG and do (Actions)
        • Loop - Actions
          • Set PickedUnit = (Picked unit)
          • Custom script: set udg_HandleID = GetHandleId(udg_PickedUnit)
          • Set interval = (Load (Key interval) of HandleID from HashtableCG)
          • Set Duration = (Load (Key Duration) of HandleID from HashtableCG)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration Greater than 0
            • Then - Actions
              • Hashtable - Save (Duration - 1) as (Key Duration) of HandleID in HashtableCG
              • Hashtable - Save (interval + 1) as (Key interval) of HandleID in HashtableCG
              • Set PickedLoc = (Position of PickedUnit)
              • Unit - Create 1 dummy for (Owner of Caster) at PickedLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add chilling ground slow to (Last created unit)
              • Unit - Set level of chilling ground slow for (Last created unit) to interval
              • Unit - Order (Last created unit) to Human Sorceress - Slow PickedUnit
            • Else - Actions
              • Set PickedLoc = (Position of PickedUnit)
              • Unit - Create 1 dummy for (Owner of Caster) at PickedLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add chilling ground freeze to (Last created unit)
              • Set AbilityLevel = (Load (Key level) of HandleID from HashtableCG)
              • Unit - Set level of chilling ground freeze for (Last created unit) to AbilityLevel
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt PickedUnit
              • Hashtable - Clear all child hashtables of child HandleID in HashtableCG
              • Unit Group - Remove PickedUnit from UnitGroupCG
              • Unit Group - Remove Caster from CG_Casters
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in UnitGroupCG) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • Custom script: call RemoveLocation(udg_PickedLoc)
 
Last edited by a moderator:
Level 15
Joined
Jul 9, 2008
Messages
1,552
like what i dont realy use hashtables normaly i just use indexting

EDIT: iv got the spell working what was it i needed to make it MUI ... whats causing it not to be i believe that it is MUI
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well, you can adjust the slow rate, rather than changing the whole trigger, right ?

The formula is, 1 + (1 * AbilityLevel), that's why the slow rate is, well, slow

You can change it to Current Speed / 2 per second
Just edit the DividePower variable settings and all good to go.
 
Last edited:

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
- Loop trigger leaks location.
- Caster group is not needed - save the caster on picked unit's id.
- Consider changing string keys into integers (it's faster).
- (Owner of (Triggering unit)) into (Triggering player) - within main trigger, group creation.
- Add 'if' to prevent useless actions if ppicked unit == null.
- Turn on loop trigger only when you actually pick something (it should be in Loop - Actions, not outside).
  • CG Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [C]hilling Ground
    • Actions
      • Set Caster = (Triggering unit)
      • Set AbilityLevel = (Level of [C]hilling Ground for Caster)
      • Set TargetLoc = (Target point of ability being cast)
      • Set AoeCG = 400
      • Set interval = 1
      • Set Duration = 5
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (Real(AoeCG)) of TargetLoc matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) is A structure) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))) and do (Actions)
        • Loop - Actions
          • If (All conditions are true) then do (Then - Actions) else do (Else - Actions)
            • If - Conditions
              • (Picked unit) Not equal to No unit
            • Then - Actions
              • Custom script: set udg_HandleID = GetHandleId(GetEnumUnit())
              • Set PickedLoc = (Position of (Picked unit))
              • Hashtable - Save Handle of Caster as (Key caster) of HandleID in HashtableCG
              • Hashtable - Save Duration as (Key Duration) of HandleID in HashtableCG
              • Hashtable - Save interval as (Key interval) of HandleID in HashtableCG
              • Hashtable - Save AbilityLevel as (Key level) of HandleID in HashtableCG
              • Special Effect - Create a special effect attached to the origin of PickedUnit using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit Group - Add (Picked unit) to UnitGroupCG
              • Custom script: call RemoveLocation(udg_PickedLoc)
              • Trigger - Turn on CG Loop <gen>
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TargetLoc)

  • CG Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnitGroupCG and do (Actions)
        • Loop - Actions
          • Set PickedUnit = (Picked unit)
          • Custom script: set udg_HandleID = GetHandleId(udg_PickedUnit)
          • Set Caster = (Load (Key caster) of HandleID from HashtableCG)
          • Set interval = (Load (Key interval) of HandleID from HashtableCG)
          • Set Duration = (Load (Key Duration) of HandleID from HashtableCG)
          • Set PickedLoc = (Position of PickedUnit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Duration Greater than 0
            • Then - Actions
              • Hashtable - Save (Duration - 1) as (Key Duration) of HandleID in HashtableCG
              • Hashtable - Save (interval + 1) as (Key interval) of HandleID in HashtableCG
              • Unit - Create 1 dummy for (Owner of Caster) at PickedLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add chilling ground slow to (Last created unit)
              • Unit - Set level of chilling ground slow for (Last created unit) to interval
              • Unit - Order (Last created unit) to Human Sorceress - Slow PickedUnit
            • Else - Actions
              • Unit - Create 1 dummy for (Owner of Caster) at PickedLoc facing Default building facing degrees
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
              • Unit - Add chilling ground freeze to (Last created unit)
              • Set AbilityLevel = (Load (Key level) of HandleID from HashtableCG)
              • Unit - Set level of chilling ground freeze for (Last created unit) to AbilityLevel
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt PickedUnit
              • Hashtable - Clear all child hashtables of child HandleID in HashtableCG
              • Unit Group - Remove PickedUnit from UnitGroupCG
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in UnitGroupCG) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Custom script: call RemoveLocation(udg_PickedLoc)
 
Status
Not open for further replies.
Top