Closed UlisesFreitas closed 3 years ago
For tracking this extension on forum: https://forum.gdevelop-app.com/t/extension-choose-random-number-string-given-a-list/34703/4
Nice! A good idea to have an extension like this.
I've simplified the whole implementation from this:
to this:
There was actually no need to use GDevelop variables here, JS variables are fine :) I've also updated various descriptions.
Thanks for submitting this, this will be very useful I think to have this capability.
Actually, I was reviewing this too and had already rewritten it with GDevelop events 👀
Ah sorry for the useless work then.. I should have said I was on it!
Thank you all for taking into account.
Well, in case anyone is interested here is my events based version (number version not working for an unknown reason): game.zip
Hi here the extension with my username added as the author of the extension Choose.zip
Thank you @UlisesFreitas, done in https://github.com/GDevelopApp/GDevelop-extensions/commit/a4820b836b341455b4d04ab353ad6334d4d24976
Choose
How to use it
Choose from list of given string of values and return one of the randomly
How to use it
Create a new variable of the type you want Number/String then go to Functions and select Choose::RandomString or Choose::RandomNumber and set the values you want to randomize separated by commas. Done.
Extra
Check a mini tutorial: https://youtu.be/h0uLECuAwko Here the project: https://drive.google.com/file/d/1ydRdbEsFX-MVKaWv6lpq7GAeWEkBQiCr
Checklist
Extension file
Choose.zip