• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Up arrow in pause menu lingering after closing the menu?

pkmnacademia

Trainer
Member
Joined
Mar 24, 2023
Posts
53
I've been dealing with a weird problem that I can't figure out how to resolve. I've tried a few methods but nothing has worked properly.

My game has a lot of new Natures so I'm trying to add a Nature Guide with pictures of stat tables.

I'd prefer it as a Pokegear app, but I think setting up a new scene/screen is slightly beyond my coding abilities and Show Picture doesn't seem to work within the Pokegear. Had the same issue trying to have an item that did it; I'd need to close the Bag and I'm not sure how to get that to work.

So I was effectively able to get what I wanted working from the pause menu, but with one major issue: when everything closes out, the "up arrow" at the top of the menu gets stuck on the screen forever.

Before opening menu
AD_4nXdXpBYO40rD4S4TUf-pY9BBEyv462DHQjAbfKiIVU_V9xrGGJmkW2pKHZEUtfuSXNjY8Kx4vX6cV-caAHRUQE_VecIRUJoxSaoywfHfpueQv8jFnQgvIBvzCHXKq29ol-s7BSq_2lbEmsZXUmZU_YWCw-Q


Opening menu
AD_4nXeA2jTG3Vm9b3aclz4Wa_UCWzjh9oyZZrvUDgIJt6fQgDr7orCI3mpWPJx-4PR-PgP7lpTyOKTKfc2rh3rvh65VU6-4UNekWmdyx9BELton2EIfAn7AU_YCMnF3kXrLWVGF_Od0MOycRgV-QgrQyWIAUqUp


Showing picture when selecting "Basic" from the choice menu

AD_4nXe7_FKssM-wPomTMgbQNGCZj9cF0xhNipESldAHNPRDTuGxqz4OvUqDiEg2aIVgb7d86l3a279Y5onxxXyAInh8VHwmPFfHMMHh11iqpqHk5JfmGC_Apo79M713bl2dZUP6ip4Pe0hGeLZ0BT0KD3pwM9_A



Closing the menu - the red arrow in the top-right is now stuck and follows everywhere, even when reopening/closing menu
AD_4nXdH0lV607yaU4WAiHCfVVqeGQZxRj734agt2p6_w1WRAn3VQnp6EkB_fz7KTkSeBERCZlywwTieozY23NKKnq9ci5XmtqCsE0ekDFeGWawSMRjBFj-TZ_DsII2_4cs7BaikL3disfMr4CIEOhC3zBg3WIo



I've tried a variety of variations of the code within the UI_PauseMenu script, and this is what I'm using now:
AD_4nXdZMHQbDNvNqqPY3b-9JgJbScb0rb6Mwo7TLYXKvwIL4E_iFTPQTQixjhVyfDepp7_Kew7XDRcpO2lPhKOYTI9g1DyylVGf_wmjwhuy36QF8ELz7tTFwOaBBVj24Zk5YvRVsTiV-FKNfTXvDGmnOajgfw6K


And the common event it opens:
AD_4nXd2F_k9Nw0ewkWckgdVbZTVSzH1Ud_B8S9j-tqZ1ZtS8dUQMVMp_6mZX4oadowTty8ysIjZ3QzgwEETFA7Ky6hs6eVsf0DUya08NJ2blgb-8od3u6qST2qdwcstAknIn8_b00GWJ-RyxJEyK1JNtxv-xXxh



It does go away if I delete 4 or 5 options from the pause menu so no up arrow shows up on the menu in the first place, but I can't really delete that many things from that menu... Any clue what I need to do to make the arrow go away?

Or even better, any idea what I could do to make the Pokegear close upon selecting a Natures app and display a choice menu that I can show pictures from instead?

Thanks in advance!
 

Swdfm

Game Developer
Member
Joined
Sep 3, 2018
Posts
34
Okay, so this is a very common issue with making screens
Luckily, every time this happens, it is the same problem, so it is easy to fix every time
The way is to think of sprites as like machines. They are switched on (created), have to be maintained (Usually with a .update method) and then switched off (By using something called dispose)

What would have happened in this case is the up arrow was definitely created, but not "maintained", or not disposed at the right time (When the pause screen closes)

I would say that using "Show Picture" is a good idea, but it is literally only useful for showing a single picture, and any use of it beyond that may lead to further issues
So, I recommend anyone wanting to make custom screens to use custom script for the reasons I just mentioned
Having a look at the Pokegear and the Trainer Card screens for inspiration are very good for beginners

Upon taking a brief glance at your common event, what it looks like is that you used "Exit Event Processing" too early, though I may be wrong about that

This has inspired me to write a tutorial, but please don't hesitate to respond or contact me if you need any further help

Hope this helps
Swdfm
 

Swdfm

Game Developer
Member
Joined
Sep 3, 2018
Posts
34
You may find this beneficial
 
Back
Top