RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] 2 quick scripting questions

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 89
I have attention problems.
I've got a couple questions about scripts in rmxp that I can't figure out.
First one: How do you change an event's graphic with a script?  If possible, I'd like to change an event's page 2 graphic from page 1's commands.  I looked through game_event, game_character, interpreter, and nothing I tried worked.
Second one: How do you make a sprite object appear above a window?  I tried messing with the z values of everything related but somehow it won't show the sprite above the window.
Searching on google and this site's search didn't help either -_-
"...because, you know, whatever."

**
Rep:
Level 82
For instances of Game_Character, such as $game_player and $game_map.events, you can change the graphic by changing the @character_name. This value is read by the Sprite_Character class, and will change accordingly.

As for your other problem, the Z value only applies to sprites that use the same viewport. Viewports have their own Z values. A sprite with a z value of 10000 will still show below another with a z value of 0 if the viewport it uses has a higher z than the other one's viewport.

***
Rep:
Level 89
I have attention problems.
Thanks for the help.  I fixed problem 2 completely, but I still can't figure out how to change an event's page 2 graphic from page 1.  I'll just have to have another event change the graphics instead of having the events fix themselves, but that's fine.  The graphic change is only temporary too :( so I have to fix it every time the player enters the zone.
"...because, you know, whatever."