Jump to content
  • 0

Any way to do perishable items?


Question

Posted

For example, once you loot an item it automatically expires / disappears at 24 hours, 7 days, etc. etc. I'm assuming this will require source, but just checking if anyone has a creative way of doing this :)

3 answers to this question

Recommended Posts

  • 0
Posted

Trying to clean out our Q/A section, answering questions that never got a good response....

 

For this one there is no good way to do perishable items over time. Could be done with source in the future I guess.

  • 1
Posted (edited)

Ok so you need to make a Global Variable to make the timer server based.

Then make a Common Event that is set to Auto Run with a conditional branch being the Global Variable.

Set your timer.

Set the item to be taken away.

Then play. So now whenever any player is logged off the timer continues to run. And when the player comes back after the timer the Item will have been gone.

Edited by merilwen91
Tested and Worked
  • 0
Posted
7 hours ago, Gravelord said:

 

Whilst you made a valiant attempt, using a global variable won't work. You see, global variables affect all players therefore the timer will count down for everyone with the item. If player A has this item and begins the countdown after looting the item, then when player B picks up the item 3 days later, player B will only have the same amount of time to use the item as player A. If you have five players with the same item then they are all adherent to the variable which was first triggered by player A- making the actual amount of time you have for the timed item seem (to the other four players) to be random. 

 

Now, if there were a way to create a new variable which self-destructs at the end of the event, or a variable which copies itself (as a unique variable) per version of the item, then each player would have a unique global variable attributed to their personal item and your suggestion would be spot on.

Ok. I tried player variable but you have to be logged on for it to work. So it's still up in the air to make it work.

×
×
  • Create New...