Platform Builder Forums
Main => Suggestions => Topic started by: CGM 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.
-
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
-
Great idea!
-
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!
-
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.
-
I'm aware of that, but still...
-
Yeah, timelines lack of parameter passing functionality.
I think on something like this:
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
if arg 0 > 10
{
<player 1>You win!
}
-
Maybe this will be too much but will be cool something like a return system.
So I can put
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.
-
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)
-
Well I tried to put it pb-like