#Script/menu basics + end goal of selectable effect menu

1 messages · Page 1 of 1 (latest)

north gulch
#

Hello!
I'm trying to make a menu with several selectable options and then reference the selected option in a BP animation controller.

For example, have a BP anim controller that runs "/say test" when you swing with a sword, but I want to have /say test1, /say test2, and /say test3 selectable via a menu and activate in place of /say test depending on which was selected.

I don't need help with animation controller itself, but I have almost no experience with UI or scripting to make the selection menu or transfer the selection variable to the animation controller.

I'm not looking for a full walkthrough unless you're feeling generous, sample files, addons I could look at with similar features, or some direction where to start otherwise would be just fine.

Thanks in advance!

gaunt rock
#

But for storing the selected button, you would either need to use a scoreboard or dynamic properties (you COULD use tags, but its laggy). Are you wanting to be able to access the selected button in the game via commands or do you just want the script to have access?

north gulch
#

Thanks!

#

I was hoping to have a pop up menu you can access with an item but I got stuck on importing from @bright needle. Apparently it's broken unless you're using experimental

#

I could probably do everything with scoreboards and commands and multiple items instead of buttons or something but my goal was to use this project as a way to start scripting

#

my script breaks as soon as I add the second import ```import { world, system } from '@minecraft/server';

system.runInterval(() => {
world.sendMessage("Hello World");
});``` works

#
import {
    ActionFormData,
    MessageFormData,
    ModalFormData
  } from "@minecraft/server-ui";

system.runInterval(() => {
    world.sendMessage("Hello World");
});``` is broken
#

i'm using these versions but I couldn't get it to work in experimental even with 1.2.0-beta of server/ui

#
      "module_name": "@minecraft/server",
      "version": "1.3.0"
    },
    {
      "module_name": "@minecraft/server-ui",
      "version": "1.1.0"
    }```
gaunt rock
#

@north gulch 1.2.0-beta works for my computer

#

Have you updated Minecraft recently?

north gulch
#

I think it auto updates

gaunt rock
gaunt rock
#

Try to also use the holiday creator features toggle

north gulch
#

I tried it with all experimental toggles on before

#

this is without any and with 1.1 server ui

#

I don't want to use experimental

sinful sentinel
#

@minecraft/server-ui is broken outside beta API