Custom Procedure Functions (Function Block)

Started by Hipposgrumm on

Topic category: Feature requests and ideas for MCreator

Last seen on 19:41, 29. Nov 2022
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom Procedure Functions (Function Block)

I was looking for a block that would allow me to define a series of functions or conditions and I realized that there wasn't one.

Custom functions will allow to add functions with parameters that you can re-use in your code without having to copy the whole thing over and get this mess-ageddon.

mess of code with many "or" statements (with associated condition or nested)
this is as small as it would go

Functions can neutralize this effect.

not so messy code, compared to above
screenshot taken from a program called Tynker

This would be more efficient than writing a plugin to add a specific function that you will only use once.

 

 

 

Also, I don't know if this ticket already exists, or if this is already a feature somewhere. I couldn't find anything (I just don't want to get banned for accidentally making a duplicate ticket of something).

This is implemented by…
Tue, 11/29/2022 - 15:15

This is implemented by procedures. You can put stuff into sub-procedure and call it from the main procedure

Last seen on 19:41, 29. Nov 2022
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What's a sub-procedure and…
Tue, 11/29/2022 - 19:42

What's a sub-procedure and where do I find it?

Sub-procedure is another…
Wed, 11/30/2022 - 15:38

Sub-procedure is another procedure you make as a mod element and call it from the main procedure