albertibay 0 Report post Posted November 1, 2012 so anyways when I was making my picture based HUD when i check the menu the pictures won't disappear i remains on top of the menu Share this post Link to post Share on other sites
0 Moonpearl 32 Report post Posted November 1, 2012 You must use the dispose method on each and every sprites when you switch scenes. Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 5, 2012 sorry for the late reply i've been busy but question how could you do the dispose method in a common event Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 5, 2012 wait i found a way but don't know why it won't work conditional branch $scene = scene_menu.new move picture 40 @20, Upper left(250,200),(100%,100%),0,normal conditional branch $scene = scene_map.new move picture 40 @20, Upper left(250,200),(100%,100%),255,normal i tried to not put the .new after the scenes but it still won't work Share this post Link to post Share on other sites
0 Moonpearl 32 Report post Posted November 5, 2012 Wooow wait... What're you trying to do with those scenes anyways? Otherwise you just need to input an "Erase picture" event command. Share this post Link to post Share on other sites
0 Kevin.ds 28 Report post Posted November 5, 2012 he is using a hud made with common events. And he wants the pictures to "Hide" when u open the menu, and re-appear when he goes out of the menu Share this post Link to post Share on other sites
0 Moonpearl 32 Report post Posted November 5, 2012 he is using a hud made with common events. And he wants the pictures to "Hide" when u open the menu, and re-appear when he goes out of the menu I understand what making a picture-based HUD means. The point of my question is to understand why the heck he would put the scene change commands in contional branches. Share this post Link to post Share on other sites
0 diagostimo 11 Report post Posted November 5, 2012 (edited) i think he is checking the scene and moving the picture acordingly, like moonpearl said you should use the erase picture command, as for checking the value of the scene(any variable for that matter) in script, you would put "$scene ==" not "$scene =" $scene = sets the value and $scene == checks it, my question is why you even need to do this stuff, by default when the map scene isnt active it disposes all pictures present, are you using a real time custom menu or anything? another alternaltive if you dont want to delete the hud is to increase the z value of your window edit: another reason you script calls are bugged, take this for example "$scene == Scene_Map.new" you need the caps, exactly like the class name is in the database Edited November 5, 2012 by diagostimo Share this post Link to post Share on other sites
0 Moonpearl 32 Report post Posted November 5, 2012 my question is why you even need to do this stuff, by default when the map scene isnt active it disposes all pictures present Plus, events don't run when not on the map anyways. Share this post Link to post Share on other sites
0 diagostimo 11 Report post Posted November 6, 2012 (edited) Plus, events don't run when not on the map anyways. true, which is why i asked if hes using a custom menu, if he is using a menu that has the maps Spriteset as the background and updates game_map in order to update the Spriteset his events will run, in that case a conditional branch that only checks if" $scene.is_a?(Scene_Map)" will work fine and not redraw the image when the menu opens Edited November 6, 2012 by diagostimo Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 6, 2012 Plus, events don't run when not on the map anyways. events don't run, but it seems like the picture won't remove itself but what i don't understand is other pictures remove itself but this one won't budge unless i remove it manually oh wait diagostimo did you say if it uses the map as spriteset well i am using a transparent menu script but the pic isn't changing its transparancy it stays at 255 no matter what i do and how do you change the z coordintates of a pic Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 6, 2012 here is what i mean though Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 6, 2012 (edited) as for now i can only fix it when i remove the transparency script anyways sorry if i bothered you guys Edited November 6, 2012 by albertibay Share this post Link to post Share on other sites
0 diagostimo 11 Report post Posted November 6, 2012 (edited) can you post the transparancy script? it using the maps spriteset for the background, i think that maybe they might have added some code that forces and update or picture creation edit: also on that matter do you want your picture apart of the background? i think the creator might have added picture creation into the menu to keep stuff legit to how it was when you entered the menu but not acounted that map pictures have a high z value, really you shouldnt play with the pictures z as you would get unexpected behaviours with fogs and what not, but you can always increase your windows z, if you look into your menu scene script, you will see something along the lines of : @command_window = Window_Command.new to give it a specified z underneath each variable that creates a window you would put the name with .z and give it value, so for the command window: @command_window.z = 1000000 Edited November 6, 2012 by diagostimo Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 6, 2012 (edited) good to know here is the transparency script #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Translucent Menu # Version: 1.00 # Author : LiTTleDRAgo #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= module DRAgoCFG def create_spriteset; @spriteset_bgmap = Spriteset_Map.new; end def dispose_spriteset; @spriteset_bgmap.dispose; end end class Window_Base < Window alias xeodrago_initialize initialize def initialize(x, y, w, h); xeodrago_initialize(x, y, w, h) self.back_opacity = 200 if $scene.is_a?(Scene_Menu) || $scene.is_a?(Scene_Item) || $scene.is_a?(Scene_Skill) || $scene.is_a?(Scene_Equip) || $scene.is_a?(Scene_Status) || $scene.is_a?(Scene_Shop) || $scene.is_a?(Scene_File) || $scene.is_a?(Scene_Name) || $scene.is_a?(Scene_End) end end class Scene_Menu include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Item include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Shop include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Name include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Skill include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Equip include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_Status include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_File include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end class Scene_End include DRAgoCFG alias xeodrago_main main def main create_spriteset xeodrago_main dispose_spriteset end end Edited November 6, 2012 by albertibay Share this post Link to post Share on other sites
0 diagostimo 11 Report post Posted November 6, 2012 (edited) ah i see the problem, after looking into spriteset_map, that automaticly creates all the picture objects, you can find this from line 44 in spriteset map: @picture_sprites = [] for i in 1..50 @picture_sprites.push(Sprite_Picture.new(@viewport2, $game_screen.pictures[i])) end we have a few options that we could do, first you could increase the z of your windows, or you could lower the z of the sprites, to lower the z of the sprites below the code i just pointed to, place this: @picture_sprites.each {|sprite| sprite.z = VALUE } that will set a default z value for all your pictures, bear in mind that the default z of a window is 100, but this would set your pictures below the fog layers etc, so i think the safest option would be to increase the z value of all your windows, actually after thinking about it, it would be very simple, go to scene base and you will see a line that says: self.z = 100 just change that value and all your windows will change, the only negative effect this would have would be for scripts that change the z value inside them, as it would not acount for your default increased value, but you could easily just go in changing the z's if a case like that did occur, finally if you do not want the pictures & fogs etc displaying at all in your menu's then you would need a rewrite of the maps spriteset, or a custom one that voids out all of the above except the map edit: on note as to what moon pearl just said, you could erase the picture in an event when you press the B button to stop it being drawn, bearing that you dont want it drawn at all Edited November 6, 2012 by diagostimo Share this post Link to post Share on other sites
0 Moonpearl 32 Report post Posted November 6, 2012 (edited) Plus, events don't run when not on the map anyways. events don't run, but it seems like the picture won't remove itself Well what I'm saying is there's no point checking what type of scene you have, because if your event is running, the scene MUST be a Scene_Map (and besides the code as you wrote it does NOT check what type the current scene is, it's doing something completely different and pointless). So you can just drop those conditional branches, what you need to do is erase the picture before calling the menu, and restore it right afterwards, because the event won't continue unless you return to the map. And use the "Erase picture" command rather than the "Move picture" command. Edited November 6, 2012 by Moonpearl Share this post Link to post Share on other sites
0 albertibay 0 Report post Posted November 6, 2012 i can't just erase it since every variable has its own picture Share this post Link to post Share on other sites
so anyways when I was making my picture based HUD when i check the menu the pictures won't disappear i remains on top of the menu
Share this post
Link to post
Share on other sites