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

[Trigger] Clarifying variables

Status
Not open for further replies.
Level 2
Joined
Nov 4, 2017
Messages
8
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 26
Joined
Aug 18, 2009
Messages
4,099
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.
 
Status
Not open for further replies.
Top