Author Topic: Command Block Manager  (Read 2159 times)

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Command Block Manager
« on: January 03, 2020, 09:52:46 PM »
I want a command block manager so that I don't have to constantly write and write and write the same code again and again and again. Yes, I am fully aware of copying and pasting. But some situations really need this feature. TingThing, please add this soon.

saiwong3268

  • Level 6: Milder
  • *
  • Posts: 119
    • View Profile
Re: Command Block Manager
« Reply #1 on: January 05, 2020, 10:16:47 PM »
Are you asking for a library feature of routines that can be reused.

If so, Ting Thing, consider including Functions that you can pass parameters into.

Also fans can submit their own routines for inclusion into library

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Command Block Manager
« Reply #2 on: January 06, 2020, 03:38:33 AM »
Great idea!

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: Command Block Manager
« Reply #3 on: January 06, 2020, 07:52:39 AM »
Are you asking for a library feature of routines that can be reused.

If so, Ting Thing, consider including Functions that you can pass parameters into.

Also fans can submit their own routines for inclusion into library
I agree!
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Command Block Manager
« Reply #4 on: January 06, 2020, 11:10:16 PM »
I think you already know I use timelines for this. Functions it's a cool idea anyways, as timelines doesn't allow to pass parameters to it. I'm very familiar actually with C# as I'm modding a lot Duck Game last months. In C# voids are similar to that.
Sorry because my English is not very good because I'm Spanish ;) :P

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: Command Block Manager
« Reply #5 on: January 06, 2020, 11:11:31 PM »
I'm aware of that, but still...

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Command Block Manager
« Reply #6 on: January 06, 2020, 11:14:04 PM »
Yeah, timelines lack of parameter passing functionality.
I think on something like this:
Code: [Select]
function 1 = arg0, arg1, arg2
Then in functions, you can use
argument 0, argument 1 or arg 0, arg 1 etc. Similar of how scripts on GML works.
So, in the function
Code: [Select]
if arg 0 > 10
{
<player 1>You win!
}
« Last Edit: January 06, 2020, 11:15:03 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Command Block Manager
« Reply #7 on: January 06, 2020, 11:16:45 PM »
Maybe this will be too much but will be cool something like a return system.
So I can put
Code: [Select]
game var random = [function 1, 1, 6] //Get a value from function 1, passing 1 and 6. Being the range of numbers the function will use to randomize.
Sorry because my English is not very good because I'm Spanish ;) :P

saiwong3268

  • Level 6: Milder
  • *
  • Posts: 119
    • View Profile
Re: Command Block Manager
« Reply #8 on: January 07, 2020, 12:08:24 AM »
for Functions I prefer something along the style of C++

Here the function returns an value (shown leftmost) and takes two variable parameters
(note: for functions that don't return anything use void)

var GetRandom(var min, var max)
{
… do something to implement functionality
}

and would be called like

var someRandomNumber = GetRandom(1, 6)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: Command Block Manager
« Reply #9 on: January 07, 2020, 12:17:05 AM »
Well I tried to put it pb-like
Sorry because my English is not very good because I'm Spanish ;) :P