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

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,243
  • 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