• 🏆 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!

[Trigger] Trigger causing game problems

Status
Not open for further replies.
Level 8
Joined
Aug 15, 2010
Messages
216
Hey Everyone!
Today i Got the spell, Winter wrath by Lord Demon X,
but the "Cast" Trigger, these two lines in it:

  • Custom script: call TriggerAddCondition( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), Condition( function WW_TT_Group ) )
  • Custom script: call TriggerRegisterUnitInRange( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), GetLastCreatedUnit(), LoadReal( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), StringHash("Range") ), null )
Are cuasing the game to go back to the main game menu once i Run the map, (loading screen wont show up). anyone can help?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
So it does not find the function WW_TT_Group. Look if it's really there (precisely spelled this way) and if it is above this place. Considering trigger pages, the jass code they produce is sorted according to the position of the pages on the left side, yet it is only updated when you reload the map.
 
Level 8
Joined
Aug 15, 2010
Messages
216
  • Winter Wrath Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Winter wrath
    • Actions
      • -------- setting all integer to 0 to ensure there won't be any bugs --------
      • Set WW_LoopA = 0
      • Set WW_TmpInteger = 0
      • Set WW_TmpInteger2 = 0
      • -------- Setting the caster --------
      • Set WW_TmpCaster = (Triggering unit)
      • Set WW_TmpOwner = (Triggering player)
      • -------- Setting the location of the caster --------
      • Set WW_TmpPoint = (Position of WW_TmpCaster)
      • -------- Creating the handle dummy --------
      • Unit - Create 1 WW_Handle_Type for WW_TmpOwner at WW_TmpPoint facing Default building facing degrees
      • Set WW_TmpHandle = (Last created unit)
      • -------- Saving the handle of the caster --------
      • Hashtable - Save Handle OfWW_TmpCaster as (Key Caster) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- Setting the integers --------
      • Set WW_TmpInteger = (Level of WW_Ability for WW_TmpCaster)
      • Set WW_TmpInteger2 = (WW_DummyAmount_Base + (WW_DummyAmount_Level x WW_TmpInteger))
      • -------- Saving the integers --------
      • Hashtable - Save WW_TmpInteger2 as (Key OrbAmount) of (Key WW_TmpHandle) in WW_Hashtable
      • Hashtable - Save WW_TmpInteger as (Key Abilitylevel) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- Adding the handle dummy to the group so the spell is MUI --------
      • Unit Group - Add (Last created unit) to WW_Group
      • -------- Setting the target point of the ability --------
      • Set WW_TmpPoint2 = (Target point of ability being cast)
      • -------- Creating the pillar and saving him --------
      • Unit - Create 1 WW_Pillar_Type for (Owner of WW_TmpCaster) at WW_TmpPoint2 facing Default building facing degrees
      • Hashtable - Save Handle Of(Last created unit) as (Key Pillar) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The range --------
      • Set WW_TmpReal = (WW_Range_Base + (WW_Range_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key Range) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- Angle + creating the orbs --------
      • Set WW_TmpReal = ((Angle from WW_TmpPoint to WW_TmpPoint2) - (360.00 / (Real((Load (Key OrbAmount) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • For each (Integer WW_LoopA) from 1 to WW_TmpInteger2, do (Actions)
        • Loop - Actions
          • Set WW_TmpInteger = (WW_LoopA + ((WW_TmpInteger2 x 2) + 1))
          • Set WW_TmpReal = (WW_TmpReal + (360.00 / (Real(WW_TmpInteger2))))
          • Unit - Create 1 WW_Orbs_Type for WW_TmpOwner at WW_TmpPoint2 facing WW_TmpReal degrees
          • Custom script: set udg_WW_TmpTrigger = CreateTrigger( )
          • Hashtable - Save Handle OfWW_TmpTrigger as WW_TmpInteger of (Key WW_TmpHandle) in WW_Hashtable
          • Custom script: call TriggerAddCondition( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), Condition( function WW_TT_Group ) )
          • Custom script: call TriggerRegisterUnitInRange( LoadTriggerHandle( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), udg_WW_TmpInteger ), GetLastCreatedUnit(), LoadReal( udg_WW_Hashtable, GetHandleId(udg_WW_TmpHandle), StringHash("Range") ), null )
          • Hashtable - Save Handle Of(Last created unit) as WW_LoopA of (Key WW_TmpHandle) in WW_Hashtable
          • Hashtable - Save WW_TmpReal as (WW_LoopA + (Load (Key OrbAmount) of (Key WW_TmpHandle) from WW_Hashtable)) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The distance --------
      • Set WW_TmpReal = (WW_Distance_Base + (WW_Distance_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key MaxDistance) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The duration --------
      • Set WW_TmpReal = (WW_Duration_Base + (WW_Duration_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key Duration) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The damage --------
      • Set WW_TmpReal = (WW_Damage_Base + (WW_Damage_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key Damage) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The speed --------
      • Set WW_TmpReal = (WW_Speed_Base + (WW_Speed_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key Speed) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- The rotation --------
      • Set WW_TmpReal = (WW_Rotation_Base + (WW_Rotation_Level x (Real((Load (Key Abilitylevel) of (Key WW_TmpHandle) from WW_Hashtable)))))
      • Hashtable - Save WW_TmpReal as (Key Rotation) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- the distance --------
      • Hashtable - Save 0.00 as (Key Distance) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- the boolean --------
      • Hashtable - Save False as (Key Return) of (Key WW_TmpHandle) in WW_Hashtable
      • -------- turning on the loop --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Winter Wrath Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Winter Wrath Loop <gen>
        • Else - Actions
      • -------- clearing the leaks --------
      • Custom script: call RemoveLocation( udg_WW_TmpPoint )
      • Custom script: call RemoveLocation( udg_WW_TmpPoint2 )
      • Custom script: set udg_WW_TmpHandle = null
Here's the whole trigger, oh and btw i closed and opened the map for like 5 times now, it still doesn't work.

I have Zero Jass knowledge, thats why i only use GUI spells so i can scale my heroes Attributes with them...
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The line you imported requires this function however. You probably have not adopted everything from what Lord Demon X submitted. The function in question is the one that shall be triggered when a unit comes within range. If you do not need that, delete it, else you have to provide.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
For example go to the root of the treeview on the left side of the trigger editor, named after your map file. Then you have a text area for jass code on the right bottom. Paste

JASS:
function WW_TT_Group takes nothing returns boolean
    return true
endfunction

Ps: Your spell or rather the whole map malfunctioned even with the lines and I only referred to the one line with the error.
 
Level 8
Joined
Aug 15, 2010
Messages
216
Ok so i went and checked the same spot you mentioned on the original spell map, i copied them and pasted them in my map, guess what, the spell worked :D thanks buddy... sometimes i think i'm a pro in map making but i find out that i still don't know the other 95%...
 
Status
Not open for further replies.
Top