- Joined
- Jul 6, 2022
- Messages
- 105
- Reaction score
- 30
- First Language
- English
- Primarily Uses
- RMMV
I have added a PIXI sprite to the scene using the following script call:
Now I'm trying to change/remove it via a separate script call (assuming the index of the added sprite is 0 or 1), but it doesn't work
I tried:
Clearly I'm missing something here but can't find the correct way of doing this anywhere, hopefully someone can explain
var mysprite = PIXI.Sprite.fromImage ("img/pictures/mysprite.png")
SceneManager._scene.addChild (mysprite)
Now I'm trying to change/remove it via a separate script call (assuming the index of the added sprite is 0 or 1), but it doesn't work
I tried:
SceneManager._scene.children[0]
SceneManager._scene.children[1]
SceneManager._scene._spritesheet.children[1]
SceneManager._scene._spritesheet._tilemap.children[1]
Clearly I'm missing something here but can't find the correct way of doing this anywhere, hopefully someone can explain