Sorry for the weird title, I want to have a scene with many npcs, each of them get a random sprite frame when the scene starts, but I want one or two of the npcs to have a different sprite instead.
I don't mind normal npcs repeating sprites I guess, but I want the vip one(s) to be the different one(s), how could I do that?

I have an array of npcs, an array that saves the vip npc, and I have the random sprite frame they get once the scene starts saved in variables, let's say there's 5 sprite frames in total to choose and they get a random one from 1 to 5 with a rand_range().

But I want to pick a different number for the vip npc that's not any of the numbers that already got picked, is there an easy way to do this?
I've tried a few things but no matter what, all their frames default to the one I choose in the editor itself.. by default the frame is 1, because I use frame 0 for their dead sprite.

This is the level script that picks which npc is the vip, and the sprite frames:

This is the npcs' script:

Thank you!!

It looks like this now, which I'm guessing it works, but the sprites are always the default value set in the editor, in this case 1:

As you can see, all three npcs look the exact same (that's frame 1, the value set in the Sprite node itself in the editor), but at least ONE of them should look different, and the portrait to the right would be the corresponding sprite:

What could be going wrong? 🙁

My guess is that the onready var line of code (in every npc's script) is the one overwriting the changes made in the level script?

This did it! I feel like this is a very bad and cheap way to do it, but I don't know a better way right now!

yowzers, now move that confusing code into a new function and try your best to give the function a name that'll remind you (for later) what in the world is going on here.