Display Pictures and erase them when changing map

Status
Not open for further replies.

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
Okay, this really bugs me up!

I want to use some pictures I made to display some light effects and for overlay mapping.

since I learned today that pictures are global, I have to erase them on every teleport when changing the map. 

and to use different ID's for every picture or assign a new picture to the ID ....

what I want to know now is... do I have to teleport first and then erase the pictures or first erase the pictures and then teleport?

I made a short gif and hope you understand what I mean. and both results don't satisfy me really...

http://imgur.com/OHXtQPk
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
I know this problem all too well ...

Try this:

Code:
class Scene_Map < Scene_Base  alias galv_archeia_sm_sb_post_transfer post_transfer  def post_transfer    $game_map.screen.pictures.each { |p| p.erase }    galv_archeia_sm_sb_post_transfer  endend
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
wow, this is gold!!

for uhm.. 1ms you can see the previous picture, but this is negligible. 

what I really like is, that I don't have to erase every picture manually now, thank you very much! =D
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Make a Paralell Event on every Map, let it call Comon Event1 for Example.

Erase Pictures 1 to 10

Erase Event (Thatway everytime the Map get loaded, the Pictures will be Erased and the Code just run 1Time).

Or:

Activate a Switch which is Condition for Paralell Common Event which Erases the Picture Ids and than deactivates the Switch.

(I supose the first Soluton is better and more simple with just making sure to put an event on every map insteed of activating that switch everytime

you want to teleport(?))
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
The problem is that if you use a map transfer with the default normal fade effect, that will happen first before it disposes all the pictures irregardless if you use a common event. The workaround would be to use fade out screen > Erase pictures > teleport (use instant) > Fade in Screen which is honestly a lot of unnecessary work (But it doesn't have the 1ms appearance).
 
Last edited by a moderator:

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
hm.. but if I use it in your script snippet (fade out, erase pictures, teleport, fade in) then it isn't a lot of work or not? 
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
okay, I have written this snippet and it works like a charm!!

#==============================================================================# ** Scene_Map#------------------------------------------------------------------------------# This class performs the map screen processing.#==============================================================================class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # * Player Transfer Processing #-------------------------------------------------------------------------- def perform_transfer #fade type (0 = black) $game_temp.fade_type = 0 #fade out fadeout(60) #teleport $game_player.perform_transfer #erase pictures $game_map.screen.pictures.each { |p| p.erase } #fade in fadein(60) end endnow the pictures doesn't have the 1ms appearance. thank you! =)
 
Last edited by a moderator:

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
To not have that lag, use Bex's method. Just simply add a parallel process event on each map that will erase, or set the correct picture (with an erase event to seal the deal). Do not set the picture or erase the picture inside the event where you are transferring, always have it on the map that needs the picture or have it be erased.


You'll have to copy and paste the event on every map, but the lag should be gone!
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
@ Archeia, i just rebuild my Solution, and it works fine,

your Described Bug isnt happening.

But iam aware there are always more than one way to do something, and the Scriptway is interesting,

it offers some new rgss3 commands. :)
 

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
well, the script snippet works perfectly fine for me and the plus is, I don't have to erase the pictures via events and can simply use the teleport command in events, thats all.

and a nice side effect, the map names doesn't appear any more if I enter the maps. XD (note: I use a script to display map names in another way)
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
well, the script snippet works perfectly fine for me and the plus is, I don't have to erase the pictures via events and can simply use the teleport command in events, thats all.


and a nice side effect, the map names doesn't appear any more if I enter the maps. XD (note: I use a script to display map names in another way)
That's an option you can turn off, basically leave the Display name empty in the map properties.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
@ Archeia, i just rebuild my Solution, and it works fine,

your Described Bug isnt happening.

But iam aware there are always more than one way to do something, and the Scriptway is interesting,

it offers some new rgss3 commands. :)
It happened to me a lot in Omori, it will get more obvious as you do image heavy stuff or when you animate a lot.
 
Last edited by a moderator:

FeaR616

Veteran
Veteran
Joined
Nov 22, 2014
Messages
277
Reaction score
52
First Language
german
Primarily Uses
That's an option you can turn off, basically leave the Display name empty in the map properties.
yeah, I know, but I found a script from MogHunter to display map names with a nice effect. this requires to write the text you want to be displayed into the map name box. 

as I tested it, the effect from the script appears AND the default map name display thing. and now this is resolved too with my short script snippet, which makes me really happy! ^_^
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top