(Solved) How do I create a procedure that only activates onece per player

Started by DaRedBearYT on

Topic category: Help with MCreator software

Last seen on 16:08, 2. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Solved) How do I create a procedure that only activates onece per player
Mon, 07/08/2024 - 16:25 (edited)

I have a simple procedure that activates every time a player joins the world, but I want it only activate once when one player joins so there respawnpoint does not change every time they join the world, how can I accomplish this? This is the procedure:

Event Trigger - triggered by external call
or when (global trigger): Player joins the world
Switch dimension of Entity/target entity to "Apocalypse"
Execute command /spawnpoint @a ~ ~ ~ in the name of Entity/target entity

Edited by DaRedBearYT on Mon, 07/08/2024 - 16:25
Last seen on 15:36, 5. Aug 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I will show by adding a…
Mon, 07/08/2024 - 12:48

I will show by adding a player persistant Global variable. I am doing something like this so i have tested it. the variable should be set to 1.

Put the procedure in an if block:

When player joins world

if: global: Newplayerjoins = 1

Then: Switch dimension of Entity/target entity to "Apocalypse"
           Execute command /spawnpoint @a ~ ~ ~ in the name of Entity/target entity

           Set Global Newplayerjoins to 0

The procedure is completely changeable, as long as you do it inside the if block and before the set variable to 0.

Hope I helped! -PixelKid

Last seen on 16:08, 2. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you show me a screenshot…
Mon, 07/08/2024 - 13:19

Can you show me a screenshot of your procedure? I am a little lost.

Last seen on 16:08, 2. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nevermind I figured it out,…
Mon, 07/08/2024 - 16:28

Nevermind I figured it out, I will be putting your username in my mods credits, Thanks for your help PixelKid!