Sorry about the ambiguous title, it's a bit hard to explain
I'm also a new to this forum and SFML in general, so please bear with me.
Basically, I created a class
Npc which is a child class of
sf::Sprite and has a few extra variables and objects in it, one of which is
sf::Texture texture. I also made an
std::vector<Npc> to contain multiple NPC sprites for a single map. However, when i run my program, only the texture of the last
Npc object actually shows, while the others are simply a blank, white square. Since I've used a for loop to put the information (lilke position, texture file, etc.), the code for all NPCs is identical, so i fail to understand why only the last NPC's texture is showing.
The code for The vector is somewhat confusing to show since I've made a parser and used
std::variant, but if you ask for it (or anything else like a screenshot of the game), I'll try my best to show only the necessary infromation. It's also night where I am, so it could take some hours before I respond in the morning or afternoon. Thanks in advance