#β | π | make menu appear whenever you first join a world
1 messages Β· Page 1 of 1 (latest)
Hi Jmynii! π
To make a menu appear whenever you first join a world, you'll want to use FancyMenu's "Listeners" feature. Specifically, the "Singleplayer World Entered" listener is perfect for this!
Here's how you can set it up:
- Exit the Layout Editor (if you're in it).
- Go to FancyMenu's menu bar -> Customization -> Manage Listeners.
- Click on Add Listener.
- Choose the "Singleplayer World Entered" listener.
- After adding it, you'll see it in the list. Select it and then click Edit Action Script.
- In the action script editor, right-click the dark-grey area to open a context menu, then choose Add Action.
- Select the "Open Screen or Custom GUI" action.
- For the action's value, enter the
screen_identifierof the menu you want to open. This can be a custom GUI you've made or an existing Minecraft screen.
This listener also provides some useful variables like $$world_name and $$world_is_first_join that you could incorporate into your menu or use in conditions if you want more specific behavior!
You can find more details about listeners here: Listeners
use $$world_is_first_join
created a new woprld and it still didnt appear
π | make menu appear whenever you first join a world
<@&1365490168563372113>
@woven quarry has requested human assistance.
A human moderator will help you as soon as possible. In the meantime, you can continue asking questions to the AI support bot if you'd like.
The support team has been notified.
The user wants to open a specific GUI (difficulty_normal_choice) only when a player enters a singleplayer world for the very first time, using a FancyMenu listener and the $$world_is_first_join variable. The GUI is not appearing, and a debug chat message confirmed the listener is not firing as expected on first world join.
havent had sauccess in fixing it yet π and i gotta head to boarding school soon
You can just use a listener for that. There is a World Join listener that exposes an is_first_join variable for actions, requirements and placeholders.
Wait. Do you use the listener already, but try to set the variable provided by the listener yourself? This is not how it works, it's read-only.
You also can't use the "Get Variable Value" action for that. You just use the variable as string and it gets replaced later. It's a placeholder.
Make sure to go into the menu bar -> Customization -> Manage Variables menu and DELETE the variables you added that have the same name as the listener variable.
You check the variable values of listeners with Is Text and Is Number.
@urban wolf
Hi again! It looks like you're super close to getting it right! That's a tricky little detail. π
Based on your screenshot, the issue is that you're using the Is Variable Value (FM Variable) requirement. That requirement is specifically for variables that you create yourself in the "Manage Variables" menu.
The $$world_is_first_join is a special variable that comes directly from the listener, so you need to check its value a different way.
You should use the Is Text requirement instead!
Hereβs how to fix it:
- Go back into the listener's Action Script.
- Remove the
Is Variable Value (FM Variable)requirement you have now. - In your
IFstatement, add a new requirement and choose Is Text. - Configure the Is Text requirement like this:
- Mode:
equals - Text:
$$world_is_first_join - Compare With:
true
- Mode:
What this does is it checks if the text provided by the listener variable $$world_is_first_join is exactly equal to the word true. The rest of your action script (opening the screen) is perfect!
Give that a try! It should work just as you want it to. β¨
You can read more about the different requirements here: Conditions (Requirements).
Iβll have to try this out next week when I comeback from boarding school but ty ^^
You're most welcome, Jmynii! π I hope it works perfectly for you when you get back. Good luck with boarding school! If you have any more questions next week, just let me know. β¨
@woven karma paused AI answers for this thread. The bot will stay quiet until resumed.