Hello, I'm currently working on a new plugin for my friend's game, this time he requested a quest system in the style of most MMOs, I'm currently working on the map visuals, namely, I would like a small exclamation symbol to appear above the head of NPCs who have quests to give.
Something like this:
However, while I was able to create the sprite and add it to the map scene, I'm not able to draw the sprite at it's intended world position, if I move, this happens:
Basically, right now I'm only able to draw to the screen position but I'd like to be able to draw sprites to the world position if that makes sense.
This is more or less how my current plugin's sprite function is structured:
var _bitmap = ImageManager.loadSystem("Quests");
var _sprite = [];
for(let i = 0; i < $gameQuests._questMarkers.length; i++) {
_sprite.push(new Sprite(_bitmap));
SceneManager._scene.addChild(_sprite);
}
I then move them to their intended position from there. I tried both of these as well:
SceneManager._scene._spriteset.addChild(_sprite);
SceneManager._scene._spriteset._effectsContainer.addChild(_sprite);
Thinking that these might anchor the sprites to the world position in the same way animations and balloons do. But it didn't work.
Currently at a loss, I've tried combing over the sprite, scene and object classes relating to the map screen but I can't find anything that would let me draw my sprites on top of my quest giving NPCs heads.
Ah well, I'll take a break for now, let me know if you have suggestions.
Something like this:
However, while I was able to create the sprite and add it to the map scene, I'm not able to draw the sprite at it's intended world position, if I move, this happens:
Basically, right now I'm only able to draw to the screen position but I'd like to be able to draw sprites to the world position if that makes sense.
This is more or less how my current plugin's sprite function is structured:
var _bitmap = ImageManager.loadSystem("Quests");
var _sprite = [];
for(let i = 0; i < $gameQuests._questMarkers.length; i++) {
_sprite.push(new Sprite(_bitmap));
SceneManager._scene.addChild(_sprite);
}
I then move them to their intended position from there. I tried both of these as well:
SceneManager._scene._spriteset.addChild(_sprite);
SceneManager._scene._spriteset._effectsContainer.addChild(_sprite);
Thinking that these might anchor the sprites to the world position in the same way animations and balloons do. But it didn't work.
Currently at a loss, I've tried combing over the sprite, scene and object classes relating to the map screen but I can't find anything that would let me draw my sprites on top of my quest giving NPCs heads.
Ah well, I'll take a break for now, let me know if you have suggestions.