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

[Unsolved] i need to know how i can port one of my warcraft 3 projects to starcraft 2

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
how do i store text tags so that i can remove them later.
Same way as in WC3 and that I described earlier.
Replacing (Last created text tag) with a variable containing the appropriate text tag.

Variables are slightly different from WC3 as they are a lot more logical. Standard global variables (like you are used to from WC3 GUI) are created along side triggers (literally) by right clicking the navigation panel where you want the global to be inserted and then choosing to create a new variable. This variable is shared between all threads and is accessed atomicly. With some simple flag modifications you can change the variable to an array for multiple storage in indexed space. My demo map shows this sort of variable very clearly (but obviously for a different type).

Unlike WC3 GUI you also have access to local variables (which were JASS only in WC3 and quite buggy). These are defined in the local variable section of every action block (in the case of triggers this is directly below the event block). These are thread only storage locations that cannot easily be shared between threads and any data stored in them is lost when the block returns or thread terminates. Each time an event causes a trigger to run it creates a new thread so using locals you can have storage space for things even if the trigger is running multiple times at once. My demo map shows this sort of variable in use for loop variables or intermediate results.
 
Status
Not open for further replies.
Top