Godot Version
4.2.1-stable or newer
Question
what is the GDScript equivalent of setting up a reference pointer to a an arbitrary variable?
like this:
fn main() {
let mut a: u8 = 10;
let mut b: u8 = 30;
let mut c = &mut a; assert!(c == a); //`c` should point to `a`
c += 10; assert_eq!(a, 20); //`c` refers to `a`, so changes by `c` affects `a`
c = &mut b; assert!(c == b); //`c` should now point to `b`
c += 10; assert_eq!(b, 40); //`c` refers to `b`, so changes by `c` affects `b`
}
while i know most Object assignments have this behavior of affecting eachother unless .duplicate()
is invoked, i would like to intentionally provoke this behavior with primitive types and other components. any ideas?