different issue with BackGround create
#1
Posted 27 June 2012 - 09:57 AM
is in Pkey Pressed event and my issue is that it only draws the background once.
So this is for me to be able to have the background of the pause menu set as the last thing the player viewed in the main room.
My issue is that once the player goes in the pause menu and back out. then once again back into the pause menu the background is the same thing. ( So no update. ) how can i fix this i tried putting it in a step event but once again it did the same thing but only the very first thing the player viewed.
i didnt know if i should have made a new thread for this so i did....here is the old one.
http://gmc.yoyogames...howtopic=545012
#2
Posted 27 June 2012 - 12:12 PM
Download 001.gmk from Host-A
#3
Posted 27 June 2012 - 12:49 PM
persistant. and i made your rooms persistant and it still caused the same issue.
If i didnt make it clear.
My issue is that create background from screen only makes 1 background and it wont change if you try to do it again.... ive tried to delete it after
its used but it causes more issues then i tried changeing its value but that didnt work. i might try a few more things and if not im just going to leave
it till i can find a better fix.
#4
Posted 27 June 2012 - 12:53 PM
#5
Posted 27 June 2012 - 09:34 PM
Download 2.gm81 from Host-A
#6
Posted 28 June 2012 - 05:00 AM
and im going to use a tut i found to compare results because they got it right but with alot of extra code.
#7
Posted 28 June 2012 - 05:17 AM
http://gmc.yoyogames.com/index.php?showtopic=505020
look at every time you pause there game compared to mine. thier background looks like the game right before you pause. Mine always looks the same.
this image show on the top left unpaused then top right paused.....the background looks good.
but on the bottom right is after you unpause it again. and do a few things in game. Bottom right shows that the background did not update.
i have highlighted the spots to look at in those two images.
#8
Posted 28 June 2012 - 05:59 AM
ok i got what im looking for....instead of posting all the code i will post the game since i had to do almost a overhaul on the code....
http://www.host-a.ne...Pause_Code.gm81
i would have not gotten this if it wasnt for your help and the code from the tutorial i posted before.
Edited by robinsblade, 28 June 2012 - 06:19 AM.
#9
Posted 28 June 2012 - 06:38 AM
*edit* i found an issue lucky i posted the file :D but i found that the sprite is not delete and is filling up ram so is there something wrong with my code?
ok i got what im looking for....instead of posting all the code i will post the game since i had to do almost a overhaul on the code....
http://www.host-a.ne...Pause_Code.gm81
i would have not gotten this if it wasnt for your help and the code from the tutorial i posted before.
to free the sprite from memory use sprite_delete("global.sprite")
#10
Posted 28 June 2012 - 10:02 AM
well i got that in my code but my ram slowly raises if you hold the pause button i have something counting the amount of images under the global variable. and it keeps raising. so am i doing it wrong?
*edit* what doesnt make sence is the code must be working bc i only get an error of the code if there is no
sprite but i dont get the error so the code should be doing what its supposed to.
if room = MainRoom {sprite_delete(global.Pause_Background) instance_destroy()}
this is my code for destroy the object that makes the sprite and deletes the sprite(yes global.Pause_Background is ths sprite)
Edited by robinsblade, 28 June 2012 - 01:04 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












