|Topic was automatically imported from the old Question2Answer platform.
I want to change the variable name let me give you an example:
var SPEED = 100
#Some Code in the player scene..
var power = "SPEED"
$Player.power = 200
Is this possible?
Is there any way to make it possible?
I hope you guys understand what i wrote am not really good at english/
I think I understand what you want to do, but I don’t know WHY you’d want to do that. Assuming your
World scene has access to the
Player scene, to change the value of the player’s
SPEED variable from the world scene would just look like this:
$Player.SPEED = 200
Why do you want to reference it using a different name? That doesn’t seem to add any value and just creates a level of indirection that’s bound to lead to unnecessary confusion.
Can you explain what the purpose would be?
jgodfrey | 2023-06-02 18:55
i made a mistake i want to change the player variable value from another scene in the world scene
anyways i found the answer
User5080 | 2023-06-02 19:09