Hey guys and gals, I am currently trying to work out a booster pack system but I'm stuck.
I have it set up to give the player all the cards as of now, But I want this to be randomized and set it up as a shop so once you pay the event runs and gives you random items.
Here is the code I have so far
for (var i = 0; i < $dataItems.length; i++) {
if ($dataItems && $dataItems.name !== '') {
$gameParty.gainItem($dataItems, 5);
}
}
But not sure how to randomize it. Any ideas?
I have it set up to give the player all the cards as of now, But I want this to be randomized and set it up as a shop so once you pay the event runs and gives you random items.
Here is the code I have so far
for (var i = 0; i < $dataItems.length; i++) {
if ($dataItems && $dataItems.name !== '') {
$gameParty.gainItem($dataItems, 5);
}
}
But not sure how to randomize it. Any ideas?