Hi folks,
I'm using a script call in a movement route to change the image of the event. The script sets the file to change it to based on the ID of the event running the script and a variable for the folder name. I'm having trouble getting it to work when a variable is used for part of the file path, but everything else works fine.
The name of the folder for my test event is "chamber1".
The script is this:
The problem is just with the folder name using the variables. If I instead do this:
)
... then it works fine and sets the file "chamber1/!$10" as the event ID is 10 and the folder "chamber1" has a file named "!$10.png". So, "this.eventId()" works just fine in this script call, but the "gameVariables.value(1033)" seems to not work at all.
I've run a show text command before doing this to make sure that the variable is in fact set to the string "chamber1", and something similar to this is working in other plugin commands that I have set up (but using \v[1033] for those since they are using text). I've tried using {\v[1033]} and \v[1033] similarly here, but they also don't work.
Any help is much appreciated!
I'm using a script call in a movement route to change the image of the event. The script sets the file to change it to based on the ID of the event running the script and a variable for the folder name. I'm having trouble getting it to work when a variable is used for part of the file path, but everything else works fine.
The name of the folder for my test event is "chamber1".
The script is this:
JavaScript:
this.setImage(`{$gameVariables.value(1033)}/!${this.eventId()}`, 1)
The problem is just with the folder name using the variables. If I instead do this:
JavaScript:
this.setImage(`chamber1/!${this.eventId()}`, 1
... then it works fine and sets the file "chamber1/!$10" as the event ID is 10 and the folder "chamber1" has a file named "!$10.png". So, "this.eventId()" works just fine in this script call, but the "gameVariables.value(1033)" seems to not work at all.
I've run a show text command before doing this to make sure that the variable is in fact set to the string "chamber1", and something similar to this is working in other plugin commands that I have set up (but using \v[1033] for those since they are using text). I've tried using {\v[1033]} and \v[1033] similarly here, but they also don't work.
Any help is much appreciated!