I'm having trouble making a gui that opens when the world is first loaded for a kit mod

Started by Keewin on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having trouble making a gui that opens when the world is first loaded for a kit mod

i tried making a gui that opens when the world is first loaded, then never reopens, but im having trouble. below is my procedure

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

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Your variable has to be a…
Wed, 10/13/2021 - 15:21

Your variable has to be a global player_persistent(worked for me, but if it doesn't work, try player_lifetime) variable(you can make it in the "variables" tab).

Then your procedure should look like this:

 

Global Trigger: Player joins the world

If: Get Global: WorldLoadedbefore for Entity: Event/Target Entity = 0

 Open Screen for Event/Target Entity pass location x: x y: y z: z GUI: KitGUI

 Set Global: WorldLoadedbefore for Entity: Event/Target Entity to 1

 

Or you can make it set the variable to 1 only when a button in the GUI is pressed.