Hi, i need to make rent system, when player purchase some item for specific time.
Еechnical task:
1) the player can rent an item for any time for which he has enough money, given the fact that every hour is worth a certain amount.
2) the player also can in the store to buy the rental time, if the item has already been purchased
3) if player rent item for a long time, for exampe for a year, it is not make thousands of items in inventory.
My algorithm:
* Make stackable item with consume time by 1 hours
* add this to store
* player can purchase, by transaction (PlayFabClientAPI.StartPurchase), any items count, that represents desired time. (example 1 day is 24 items)
Problem: if player purchase for example 24 items, it consumed whole stack by one hour, because stack is not add "expires time".
My thoughts:
Maybe i can add "expires time" when item is purchase and stacked?
Maybe i need to use another approach?