Hello! I've been trying to set up this small system where the player traverses a looped map. at the top of the map, there's a line of events that add up a global counter which changes the image of an NPC event placed on the map as well when the counter hits certain values.
my problem with this however is that the image sprites I used don't seem to change at all, or at-least the latter two.
this image is how my sprites are placed, with the default sprites being behind them as reference (hidden when exported.)
now, implementing the actual functions to change the image wasn't too hard, just some directional events that change the image (and forces the event to face downwards, which makes it face towards the player as intended, just in case.)
this "worked," the first sprite would appear, but the other two wouldn't.
didn't want to resort to the forums quite yet, i just assumed that it was a bug since there's no reason for this to not work.
Instead, I removed everything I did and tried to replicate the process using a script I made:
(This code isn't the problem I believe, just listing it here as reference for how the system is supposed to work.)
trying this code, everything should've worked as intended but the code is experiencing the same problem I had when using the event editor, in which the first sprite would show up but when i switch to the other two they don't appear at all.
why is this the case? It has to be because of the sprite sheet itself because I'm not seeing anything being done wrong on the technical side. I've even tried two separate approaches to come out with the same outcome. even then, I can't see anything wrong with the sprite sheet since everything is aligned. (I don't believe that it's because the character isn't facing downwards, because sprites would still be invisible if i told the event to face downwards before changing the image.)
my problem with this however is that the image sprites I used don't seem to change at all, or at-least the latter two.
this image is how my sprites are placed, with the default sprites being behind them as reference (hidden when exported.)
now, implementing the actual functions to change the image wasn't too hard, just some directional events that change the image (and forces the event to face downwards, which makes it face towards the player as intended, just in case.)
this "worked," the first sprite would appear, but the other two wouldn't.
didn't want to resort to the forums quite yet, i just assumed that it was a bug since there's no reason for this to not work.
Instead, I removed everything I did and tried to replicate the process using a script I made:
JavaScript:
const loopChange = [[3 , 0],[6 , 1],[9 , 2]];
for (let animal in loopChange){
numTbl = loopChange[animal];
var trueNum = numTbl[0];
if (trueNum == ($gameVariables.value(1))){
let spriteId = numTbl[1]; $gameMap.event(16).setImage("CharSprites1",spriteId); break;
} else if (loopChange.length - 1 != animal) { $gameMap.event(16).setImage("",0);
} else {break; }}
(This code isn't the problem I believe, just listing it here as reference for how the system is supposed to work.)
trying this code, everything should've worked as intended but the code is experiencing the same problem I had when using the event editor, in which the first sprite would show up but when i switch to the other two they don't appear at all.
why is this the case? It has to be because of the sprite sheet itself because I'm not seeing anything being done wrong on the technical side. I've even tried two separate approaches to come out with the same outcome. even then, I can't see anything wrong with the sprite sheet since everything is aligned. (I don't believe that it's because the character isn't facing downwards, because sprites would still be invisible if i told the event to face downwards before changing the image.)