• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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,097
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