Call procedures with custom variables

Started by RedWirePlatinum on

Topic category: Feature requests and ideas for MCreator

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Call procedures with custom variables
Wed, 03/29/2023 - 04:11 (edited)

How I imagine this would work is something like how command parameters work.. but for procedures.

Procedure variables are created either automatically with the "Get procedure variable [name]" block or the same way you make local variables (with the option to define as variable or local)

Below is a rough sketch of what I imagine the blocks would look like with paint.net
Procedure variable blocks

- "Get procedure variable [name]" simply gets the defined variable

- "Set procedure variable [name] to [value]" would be used under the purple "Call procedure [procedure] with variable list", defining any of the variables needed. If a variable isn't defined, then it'll return its default value. (or air for item/block variables)

So far the closest thing we have to custom variables is "call procedure at x,y,z". If my idea is possible, that would be awesome.

 

P.S. If there could also be a way for the "Deal [x] damage to entity" block to let us choose whether or not the damage ignores armor or not, that would also be cool :>

Edited by RedWirePlatinum on Wed, 03/29/2023 - 04:11
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"whether or not the damage…
Wed, 03/29/2023 - 02:19

"whether or not the damage ignores armor or not"

I wrote "or not" twice, woops.

Joined Aug 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
We already have something…
Wed, 03/29/2023 - 02:49

We already have something planned concerning the main feature of your suggestion

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
YOOOOOOOOOOO I'm excited to…
Wed, 03/29/2023 - 03:03

YOOOOOOOOOOO I'm excited to see that in action one day

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think when you choose…
Sat, 04/08/2023 - 14:09

I think when you choose generic damage the armor automatically lessens the it.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
^ I tried it, I dealt 10…
Fri, 04/14/2023 - 21:31

^ I tried it, I dealt 10 damage to myself wearing full netherite armor and got 10 damage. I might've been updated as of 2023.1 but I'm pretty sure its still the same