Displaying equipped weapon/armor Icons in evented menu

Hello!

I've been trying to display the icons of my equipped weapon/armor for some time now using some script.
I'm basically trying to call the icon of the currently equipped weapon of my heroes.
After some online research online I ended up with this.


Equip_weapon = drawIcon($gameActors.actor(1).weapons()[0])
SceneManager._scene.addChild(Equip_weapon)
Equip_weapon.x = 20
Equip_weapon.y = 240


Of course, it's not working, and I'm not even sure if I'm on the right path since I'm in no way a coder.

My other solution is to do it manually with pictures and a lot of conditions/variables, but if someone knows a cleaner way to do it it would be immensely appreciated!

Cheers!
drawIcon takes three arguments:

drawIcon($gameActors.actor(1).weapons()[0], X position, Y position)

Also, adding a child to the scene isn't the wrong idea but I would add it to whatever Window you're trying to construct, rather than using the SceneManager. Unless you're doing a script call from the maker sdk program?
drawIcon takes three arguments:

drawIcon($gameActors.actor(1).weapons()[0], X position, Y position)

Also, adding a child to the scene isn't the wrong idea but I would add it to whatever Window you're trying to construct, rather than using the SceneManager. Unless you're doing a script call from the maker sdk program?

Thanks for the reply!

I'm making a script call from a common event that I use to create my menu.

I added a child to the scene because that's how I do it for Pixi text,
I honestly don't know how to setup a window... I'm going to check that, Thank you for the clue!

Original thread: https://forums.rpgmakerweb.com/threads/displaying-equipped-weapon-armor-icons-in-evented-menu.122324/