Bouh
February 16, 2020, 10:53pm
1
Hello you search arrays in GD5?
You can test this extension, it’s experimental, if you wish code it with me you are welcome!
Description:
This extension use the variables structures, that mean you can see the values in the debugger!
For now arrays are only on Objects .
You can:
Add value at the end of the array (Push)
Remove the first value in array (Shift)
Remove the last value at the end of the array (Pop)
Get length of the array
Reverse the array (Reverse)
I will add:
Add value at start of the array
Other suggestions ?
Download:
array_extension_0.0.1b.json - Download
5 Likes
I only did a quick poke through this, but it looks really great.
Biggest suggestions:
Global Arrays
Scene Arrays
“For Each Entry in Array” style of event.
1 Like
Kink
February 18, 2020, 9:27am
3
+1 to @Silver-Streak suggestions.
My suggestion :
action to sort array (ASC/DESC)
Expressions to :
return the index of the higher value
return the index of the lower value
return the average
return the weighted average
dump the (whole) array as text (usefull for debugging/testing)
Here is my santa list
Indeed great idea with this extension, i’ll test it in the evenning
2 Likes
Bouh
February 18, 2020, 4:30pm
4
This work like this ?
Yes i will add this one too!
Silver-Streak:
Global Arrays
Scene Arrays
I try to make functions before, and after i can extend the extension with global and scene variables.
Silver-Streak:
“For Each Entry in Array” style of event.
No idea how to implement this one if someone want give a try…
Ready for next version
return the index of the higher value
return the index of the lower value
return the average
action to sort array (ASC/DESC)
Kink
February 18, 2020, 4:57pm
5
I’m not sure @Bouh , here is a french explanation : Leçon Statistiques - moyenne simple et moyenne pondérée - moyenne simple et moyenne pondérée
It’s a bit specific and i am not sure yet of how i would use it in game devlopment, but it’s really useful in statistics.
Bouh
February 18, 2020, 6:09pm
6
Thats same operation.
See the code in action with values from your article:
https://repl.it/repls/CriticalAmbitiousYottabyte
1 Like
That isn’t possible as event functions haven’t access to the IDE and cannot declare events. Events can’t be declared through extensions for the time being anyways.
1 Like