• It's time to dig through Hive's model database and dust off some oldie but goldie models and enter Hive's Texturing Contest #31 : Repurposing! Click here to enter!
  • 🏆 Hive's 5th HD Modeling Contest: Creep Camp is now open! Click here to enter!

[Trigger] Clarifying variables

Level 2
Nov 4, 2017
So i was trying to assign a location variable to another location variable also the logic of my trigger was all correct except that i notice is that when i try to reassign the latter variable it takes and removes the value of the former variable. If i may ask are gui variables pointers? Are there any specifics why variables acts like pointers in gui?
Level 25
Aug 18, 2009
Not a trait of GUI, all object variables in jass are refs. There is no general copy construction. Imagine you could just copy a unit, some objects are interactive in the game world. With a location it's relatively easy, though, there is a function "Convert coordinates to point" as well as "X of point" and "Y of point".

In the jass world, locations are mostly not required, by the way.