• 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.

Weird bug with the Trigger Editor...

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hello! I have a problem making an action in GUI. However, the problem is not in me but in the WE. :xxd:
After i click this action :
Hashtable - Save Handle Of Ability as Value of Value in (Last created hashtable)
if i click on "Ability" the Trigger Editor crashes (clicking on the other red stuff doesn't crash) and i can't do anything in it anymore. However, other Editors, pallets and the WE it's self don't crash. How do i fix this? I don't have this problem when saving something else, not Abilities.
I also tried closing my map and opening a brand new. The problem occured again.

Is there a Jass script i can replace this action with?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
This is because the ability type was never implemented properly. It is only a loose reference to the internal structures used to represent an ability with no useful functions. As GUI never had components for interacting with abiliites it will crash the editor due to an invalid refererence.

This was because the makers of WarCraft III were stupid and did not explain what they did. When the patch team (who did not make WarCraft III) added hashtables they added to GUI one for interacting with abilities when GUI never had the ability type supported. The ability type that GUI presents users with is actually a subtype of integer (it compiles directly to integer), not the actual jass ability type which is where the confusion started.

Thus what you want to do is save an integer. You will need to save the ability raw type as the integer.

The first custom ability is usually refered to as the integer 'A000' for example. When you choose Strom Bolt as an ability type in GUI it simply puts such a integer for that parameter. The actual JASS ability type is virtually usless, and the GUI hashtable action trys to refer to that.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Set Ability = Animate Dead
  • Custom script: udg_Integer = udg_Ability
Then save that integer to a hashtable.
To load, simply load the integer.

Example;
  • Save
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_Hashtable = InitHashtable()
      • Set Ability = Flame Strike
      • Custom script: set udg_Integer = udg_Ability
      • Set Value = 100
      • Hashtable - Save Value as 0 of Integer in Hashtable
      • Set Ability = Banish
      • Custom script: set udg_Integer = udg_Ability
      • Set Value = 200
      • Hashtable - Save Value as 0 of Integer in Hashtable
      • Set Ability = Siphon Mana
      • Custom script: set udg_Integer = udg_Ability
      • Set Value = 300
      • Hashtable - Save Value as 0 of Integer in Hashtable
  • Load
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Ability = (Ability being cast)
      • Custom script: set udg_Integer = udg_Ability
      • Set Value = (Load 0 of Integer from Hashtable)
      • Game - Display to (All players) the text: (String(Value))
What I did there is saving an Integer value to the respected abilities.
And upon cast, it loads the value and show it as Game Message to see if it actually works, and it is.
 
Last edited:
Status
Not open for further replies.
Top