Basically what I'm trying to do is to have a function that checks if a player has an inventory item, if not, than gives the player that item and than displays that item text property on a label. How can I do this?
Thanks!
Hey Gepard, long time no see :)
function GiveItemIfDoNotHaveOne(InventoryItem *item)
{
if (!player.HasInventory(item))
{
player.AddInventory(item);
// Set label text
lblItemName.Text = item.Name; // or item.GetTextProperty("property_name");
}
// optionally do something if player already has one
else
{
Display("I have it already");
}
}
Good to see you old friend and thanks for the help!