Deck Management | GBStudio Array Plugin
A downloadable Plugin
What?
Simple plugin for managing a static array of up to 60 numbers (this maximum can be changed in deck.c, but beware of available memory for other things, if anything reduce it to what you need - and remember a max size of 10 means available slots are 0 to 9)
Disclaimer: I'm not a real programmer, shit might be whack. Thanks to gud_graphics (https://github.com/mikeleisz/gud_gbs_plugins) on the GBS Discord for JS help.
Update (version 2)
- Improved shuffle code in deck.c - should result in no more duplicates in the array when Shuffle event is used
Events Added:
- Reset Deck Data
- from 0 to n, sets all array slots to 0 and specifies n as the soft limit
- Add Deck Value to Index
- sets value of slot n in array
- Store Deck Value from Index
- stores value from slot n to an engine variable
- Shuffle Deck Values
- randomly reorder array slots from 0 to soft limit
JavaScript is pain...
Status | Released |
Category | Assets |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | CURSED BOOTLEG INC |
Tags | Asset Pack, Game Boy, Game engine |
Download
Download
DeckManagement_02.zip 5.5 kB
Install instructions
Unzip, add to your project's Plugins folder
Comments
Log in with itch.io to leave a comment.
Can I use more than one array or it's just one?
This plugin is fantastic, and came at exactly the right moment for me. I'm using it to switch scenes dynamically, based on the order in which players discover them. My previous code was a mess of nested if/else statements. Now, I just store the scene number in the array, and pull them out in the proper sequence! Thanks!
Glad it could help ^^
Hell yeah. Puzzle game here I come.
Enjoy, happy developing ^^