A way to refresh the screen without transfer or going into the menu scene.

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
Hello. I decided to make this topic since it's been killing me that I have been unable to figure something out. Alright, so basically, my project's main weapons consist of fire arms (It's an ABS) and the weapons are displayed on the map instead of invisible like it normally is by default, near the characters hands. I noticed when I try to swap from one weapon to another without going into the menu, the graphic on the map never changes to reflect that weapon change. I've noticed this is pretty much the same for anything else out there whether it be via a script or through eventing that the graphic just doesn't change, but if you go into the menu, the weapon has clearly been changed into whatever it is you were swapping with and only updates the graphic to reflect that change either via going into the menu scene or transferring. 

My question is, is there a way either via eventing or using a script call that can force a graphic to update itself properly instead of depending on transfer or scene changes to update the graphic? I would seriously appreciate the help.

I've tried this "Graphics.update" thing but it doesn't do what I was hoping it would do.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
SceneManager.scene.refresh_characters

Might work, but it's not the proper way to do it.
 

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
It gave me a game crashing error. Thanks for trying, though.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
It gave me a game crashing error. Thanks for trying, though.
Oh, right

Code:
SceneManager.scene.instance_variable_get(:@spriteset).refresh_characters
If this is a script call you might need to break it down like this
Code:
s =SceneManager.sceneo = s.instance_variable_get(:@spriteset)o.refresh_characters
 
Last edited by a moderator:

MHRob

Card Master
Veteran
Joined
Jun 30, 2014
Messages
133
Reaction score
24
First Language
English
Primarily Uses
RMVXA
None of it seemed to work for me, for whatever reason. However, using that as some sort of clue via using the word "spriteset" as a keyword via ctrl+F (Search) there was something else I found in one of the main scripts that I use that has an odd behavior from within the script, but using it via eventing, seems to make it work brilliantly, and i'm not even sure if it's a regular script call.

SceneManager.scene.spriteset.refresh!Now my character changes his weapon with refreshed graphics matching the equipped weapon. I'm not exactly sure what makes it so special, but this one works.

Thank you very much for the help, Hime! You gave me a good lead to find what I needed to find.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
None of it seemed to work for me, for whatever reason.
The reason is that any ABS script has to make big changes to how the engine works - and the different ABS scripts make different changes, so one bugfix usually only works on one of the ABS, not all of them.
And you never said which ABS you are using...


If you have other problems with it, please remember to link to the ABS you're using, because a lot of errors can't be identified without that info.
 

vacis82

Villager
Member
Joined
Feb 16, 2015
Messages
19
Reaction score
1
First Language
Latvian
Primarily Uses
try this in script call 

SceneManager.goto(Scene_Map)

i use it for a npc that loas my save file but after i loadesd it it didnt display my charecter it was invisible and the sprite stayed were i talkt to the npc 

this call was taken out off my autoload call

script call

DataManager.load_game(0)

Graphics.transition(30)

 

$game_system.on_after_load

SceneManager.goto(Scene_Map)

 

dont use the the full call comand unles you want to load your 1st save file :D   :D
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top