Script call to change all game events' Opacity and Transparency ON/OFF

Started by Draxicor, July 14, 2016, 05:36:42 pm

Previous topic - Next topic

Draxicor

Is there a way to change all of a game's events opacity to 255 and all of their Transparencies to OFF?

I'm looking for something similar to this one, that turns off all events' Self Switches
$game_self_switches = Game_SelfSwitches.new

Thank you in advance and please forgive my ignorance  :^_^\':

KK20

Why would you need such a thing? I feel like this would be easier if you used one switch and made a second page to show/hide the graphic. The solution that you're requesting would require a script; it's not a simple one-liner.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Draxicor

I see, thank you!

I need this because I did a sort of new game plus kind of thing, where it takes me back to the first map of the game. I reset all switches, variables and self switches, but I fear that the events that lost opacity/got transparent along the first play through would remain invisible.

KK20

For starters, you're changing opacity and visibility through Move Event commands, right? You do realize that those do not carry over when you teleport back into the map. This also includes Erase Event; you can still bring that event back by just teleporting back into the map. You have to use a switch and create another page within the event to keep it permanently gone (or for any other effects/changes you make to the event).

There's no need for such a script because the game already handles this by default. Can you give me an example of how you are treating your events?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Draxicor

Oh, that's good to know!
Since the Opacity and Transparency carries over if applied to the player, I thought the same happened with events/NPC's. I use self switches or switches and new event pages to keep them permanently "erased" throughout the game, but since they are all turned off upon restarting, they shouldn't be any problem. Since the game has a lot of rooms you don't go back to, I also used the Transparent ON command, so that's why I thought I needed help  :^_^\':

But if they don't carry over maps, that's great! Thank you again!

KK20

It only carries over for the player because it is not recreated every time you change maps; it simply reuses the player instance ($game_player). Events, on the other hand, have to be recreated from scratch.

Whenever you load a new map, everything has to be reinstantiated, including the events. All this data is retrieved from your Map###.rxdata files. The little changes like an event's opacity are not saved since it's just reading directly from this file (the events are created in their "purest" form--whatever you have them set up in the editor).It then looks at the game's switches and variables to determine what event page to use.

It's a good thing it's like this too. Could you imagine your game having to save the data for EVERY EVENT INSTANCE all the time? :P

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!