Do you ever have a problem that you think about a lot and just when you think you have found a solution it sort of slips away again. Well I've got one of those now. I have been thinking about this one for 6 hours or more on and off. I am almost certain that it is doable but am not quit sure. Here is the problem -
I have a series of identical placeables that can be used. They all use an instance of the same onused script.
Once each one is used it cannot be re-used unless they are all reset.
Each one has a unique tag and also a variable that contains a unique value.
My problem is that I want to introduce a count down timer that counts down in seconds and would behave as follows.
Once the first item is used the counter is initialised and the count down begins
If another of the placeables is used before the countdown reaches zero, the counter is reset to its initial value and the count down continues with the new value.
Repeat until the last placeable is used.
If the count down reaches zero before another placeable is used, stuff happens immediately and the count down is terminated immediately.
Once the last placeable is used the count down is terminated immediately.
If at all possible it needs to be called from the onused script as that is where all the stuff (that happens when the counter reaches zero) is situated.
Sorry to be pain and keep asking all these questions when I really should be able to figure it out myself.
Thanks in advance for any help or comments.
TR
PS I checked through all the scripts that I posted as "Unearthed Gold" on the new vault but without success.





Retour en haut







