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

New Variable Types(this is not a dream)

Status
Not open for further replies.
Level 21
Joined
Mar 27, 2012
Messages
3,232
One day I copied my unfinished equipment from one map to another.
Then when I wanted to change variable names I came across a problem, it would not let me save it after renaming.
More Variable Types.JPG
First I started to wonder what's going on, until it finally hit me.
THERE IS NO MODEL FILE VARIABLE in GUI world editor. This thing shouldn't even exist.
After a few minutes of thinking I figured out why it happened. Warcraft doesn't really care about variable types, it only checks how they are used.
  • Special Effect - Create a special effect attached to the ItemAttachB[ItemLevel] of (Triggering unit) using ItemGraphicB[ItemLoopB]
In here I had used a string variable(ItemGraphicB) as a way to store models.
Unlike my other variables, this one didn't have any values set, so the editor thought that it IS a model file variable.
Proof that it works:
More Variable Types2.JPG

What is the benefit of this? Why not just keep using strings? - This thing allows you to pick a model from the list. Strings do not. So, for GUIers it's quite useful.

EDIT: With some further investigation I found out that all variables created this way have 2 types.
In this case the parent-type is string and child-type is model. Logically I can assume, that using this way always means 1 parent variable and 1 that's a child.
 
Status
Not open for further replies.
Top