07:35 AM 02/12/2022
So I took way too long to make this.
My answer to your question is that you use an array to keep a reference of the items you want to sell.
You could make the GUI however you want, but to make it easier for you, just download this script from the link below:
https://drive.google.com/file/d/1S_FiSnjNHa6CvOvC1sqkAhw9DL3urLnQ/view?usp=sharing
This script MAY or MAY NOT be incompatible with other scripts, which would definitely suck if you just wanted to put this script into your game without it haphazardly breaking everything. I can only apologize for any inconveniences that may occur.
The shop GUI appears in printed text, and it lets you navigate it via keypress.
My answer to your question is that you use an array to keep a reference of the items you want to sell.
You could make the GUI however you want, but to make it easier for you, just download this script from the link below:
https://drive.google.com/file/d/1S_FiSnjNHa6CvOvC1sqkAhw9DL3urLnQ/view?usp=sharing
This script MAY or MAY NOT be incompatible with other scripts, which would definitely suck if you just wanted to put this script into your game without it haphazardly breaking everything. I can only apologize for any inconveniences that may occur.
The shop GUI appears in printed text, and it lets you navigate it via keypress.
07:35 AM 02/12/2022
Quote from kringlePringles , 07:35 AM 02/12/2022Now how do you make items? My lazy answer is that you COULD just read the entire script and test how it works... but here's a sort of jump start on how to use it:
So I took way too long to make this.
My answer to your question is that you use an array to keep a reference of the items you want to sell.
You could make the GUI however you want, but to make it easier for you, just download this script from the link below:
https://drive.google.com/file/d/1S_FiSnjNHa6CvOvC1sqkAhw9DL3urLnQ/view?usp=sharing
This script MAY or MAY NOT be incompatible with other scripts, which would definitely suck if you just wanted to put this script into your game without it haphazardly breaking everything. I can only apologize for any inconveniences that may occur.
The shop GUI appears in printed text, and it lets you navigate it via keypress.
If you already created a tool outside the array, you just type down the model and the tool itself as an object inside an array like so:
let ToolBrickBuddyPlush = new Tool("Brick Buddy Plush"); //Brick Buddy Plush
ToolBrickBuddyPlush.on("activated", p => p.centerPrint("Aww...",2));
let daShopItems = [
{//this is normally what you write if you have already set the tools
Tool : ToolBrickBuddyPlush,
Name : ToolBrickBuddyPlush.name,
Desc : "So cute, so chic, and very cuddly!",
Cost : 1001,
Model : 344025
}
]
07:37 AM 02/12/2022
Quote from kringlePringles , 07:35 AM 02/12/2022Well damn it that didn't work. Oh well I'll just remove the formatting.Quote from kringlePringles , 07:35 AM 02/12/2022
So I took way too long to make this.
My answer to your question is that you use an array to keep a reference of the items you want to sell.
You could make the GUI however you want, but to make it easier for you, just download this script from the link below:
https://drive.google.com/file/d/1S_FiSnjNHa6CvOvC1sqkAhw9DL3urLnQ/view?usp=sharing
This script MAY or MAY NOT be incompatible with other scripts, which would definitely suck if you just wanted to put this script into your game without it haphazardly breaking everything. I can only apologize for any inconveniences that may occur.
The shop GUI appears in printed text, and it lets you navigate it via keypress.
Now how do you make items? My lazy answer is that you COULD just read the entire script and test how it works... but here's a sort of jump start on how to use it:
If you already created a tool outside the array, you just type down the model and the tool itself as an object inside an array like so:
let ToolBrickBuddyPlush = new Tool("Brick Buddy Plush"); //Brick Buddy Plush
ToolBrickBuddyPlush.on("activated", p => p.centerPrint("Aww...",2));
let daShopItems = [
{//this is normally what you write if you have already set the tools
Tool : ToolBrickBuddyPlush,
Name : ToolBrickBuddyPlush.name,
Desc : "So cute, so chic, and very cuddly!",
Cost : 1001,
Model : 344025
}
]
But if you wanted to make consumables that let you carry as many of it as you want... or for whatever reason you just wanted to make the tool itself inside the array... you could just do this:
let daShopItems = [
{
Tool : new Tool("ToolItemTemplate"),
Name : "ToolItemTemplate",
Desc : "Allows you to write descriptions and flavor text!",
Cost : 1000,
Model : undefined,
Multi : true,
Equipped : function (p) {
p.bottomPrint("You equipped tool...",3);
},
Unequipped : function (p) {
p.bottomPrint("You unequipped tool...",3);
},
Activated : function (p, me){
p.bottomPrint("You activated tool...",2);
setTimeout(p.destroyTool(p.inventory.find(tool => tool.id === this.id && tool.name === this.name)), 2000);
}
}
07:40 AM 02/12/2022
You could always read the script and see how it works, because we'd be here all day if I keep talking about it.
Just know that the
And sorry for the long line of posts.
Just know that the
player.setInterval()
function will always handle interval stuff related to items.And sorry for the long line of posts.
09:27 PM 02/12/2022
Quote from kringlePringles , 07:40 AM 02/12/2022THANK YOU SO MUCH!!!!!!!!!
You could always read the script and see how it works, because we'd be here all day if I keep talking about it.
Just know that theplayer.setInterval()
function will always handle interval stuff related to items.
And sorry for the long line of posts.