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

Region comparison

Status
Not open for further replies.
Level 2
Joined
Jun 19, 2011
Messages
12
Is there a condition that can check if two regions (one in a Region variable, the other in a hashtable) could be compared, to see if they are equal?
 
Last edited:
Level 2
Joined
Jun 19, 2011
Messages
12
Yes, but that doesn't answer my question. That only returns a pointer to an object. My question was how to check if 2 regions are the same, when they are stored as variables. And I'm using the GUI. Is it possible to compare handle ids (GUI or JASS)?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 104
    • Events
    • Conditions
    • Actions
      • Custom script: if GetHandleId(region1) == GetHandleId(region2) then
      • Game - Display to Player Group - Player 1 (Red) the text: Same
      • Custom script: else
      • Game - Display to Player Group - Player 1 (Red) the text: Different
      • Custom script: endif
If you are using GUI variables then add udg_ prefix. If region1 is the variable's name then: GetHandleId(udg_region1)
 
Level 2
Joined
Jun 19, 2011
Messages
12
Thanks! I ended up taking a different route by creating a reference table (all integers), but +Rep anyhow for the free knowledge. I'll likely make use of it in the future.
 
Status
Not open for further replies.
Top