I have a lot of weapons in game and want to show a picture based off which is equipped and saved to a variable.
I could do so through a lot of conditional branches but believe it would be easier with a script, if possible.
My goal is:
if WeaponEquip = 1 , Show pic "weapon1"
if WeaponEquip = 2, Show pic "weapon2"
Currently I'm using:
$gameScreen.showPicture(1, "weapon%1".format(this.$gameVariables.value(41)),0, 0, 0, 100, 100, 255, 0);
but this doesn't seem to work. I have looked and found a similar thread (from which I put together this script) but it is for MV while I'm using MZ. Not sure if that matters much or if my script is just defunct.
forums.rpgmakerweb.com
I have no prior experience with scripting so I simply put together what I reasonably thought would work, but unfortunately it doesn't seem to.
I could do so through a lot of conditional branches but believe it would be easier with a script, if possible.
My goal is:
if WeaponEquip = 1 , Show pic "weapon1"
if WeaponEquip = 2, Show pic "weapon2"
Currently I'm using:
$gameScreen.showPicture(1, "weapon%1".format(this.$gameVariables.value(41)),0, 0, 0, 100, 100, 255, 0);
but this doesn't seem to work. I have looked and found a similar thread (from which I put together this script) but it is for MV while I'm using MZ. Not sure if that matters much or if my script is just defunct.
[SOLVED] Show a picture based on a variable
I use a variable to show pictures. Currently its this: basically: if variable=1 -> show "map1" if variable=2 -> show "map2" ... and so on but when you have ~100 different pictures, this event code would be horrible. How can I change this to a single command that basically says show...
forums.rpgmakerweb.com
I have no prior experience with scripting so I simply put together what I reasonably thought would work, but unfortunately it doesn't seem to.