Started by
Enderdragonspy
on
Topic category: Help with Minecraft modding (Java Edition)
So I am making a mod and want to make a Gui that opens when a player joins the world for the first time only I figured out how to add a Gui that opens upon entry to a world but not how to on the first time How could i do this?
Try creating a global variable that is set to 1 the first time the player joins the world and then the GUI only opens if the variable is 0. Obviously you'll need to make sure the GUI opens before the variable is changed, or else the GUI would never open. Then make it not open if the variable is 1.
Logic PLAYER_PERSISTENT variable would be enough.
If I may ask where could I find logic PLAYER_PERSISTENT?
In the global variables section
Use global trigger "on world loaded" - open gui. then you could use a variable to make it so the menu only opens once.
Man, just update your MCreator to 2020.4 or 2020.5.
ye im doing that now lol I dident relise a new version was out
It lets you search for blocks.
so i tried making this, and i made this
if: get local:WorldLoadedbefore = 0
do: Open screen for event/target entity pass location... gui: kitgui
set local WorldLoadedBefore to 1
and its not working, how do i fix this
don't use local variables smh, they don't get saved in this case
its just that i cant find the global variables
i think you might not have been looking around the app well enough, there's literally a "Variables" tab on the workspace where you can create global variables and then in procedure editor a "Custom Variables" category on the sidebar which contains procedures for getting & setting both global & local variables
Keewin,
This is very helpful thanks!