![]() |
scheduleEvent
I've scripted a bomb, using the scheduleEvent command to plan an explosion.
Since we have custom movement on Graal2001 (Bomy Island), the canbecarried(); command doesn't work. Is there a way to check how many time has been past since I scheduled the event? I'm using sleep in the script also, so don't come with timeouts please. Ty. |
You could pass the time of the scheduling as parameter?
like scheduleevent(5,"onexplosion",timevar2) |
That's not what I ment, I mean..
Lets say in my bomb, I did; scheduleEvent( 5, "explode", ""); And I am going to pick it up, after for example.. 2 seconds, I want something to say that it still has 3 seconds left before it's going to explode. But since it is serverside, I don't want to use a timeout to count that, due the lag it will give. Neither I want to use a timeout on clientside, since there are sleep() commands being used there. So, basically.. I'm looking for some command that gives the time left, before the first time an event gets started (something like; getEventData( "function"); which returns the time left untill it would be started, and the params). Is this possible? |
Try doing this:
Before you schedule the event set a variable to timevar2. This will allow you to do something like "timevar2 - variable" to get the time since you scheduled it. |
Ofcourse ;D Smart one.
Tho, it doesn't give a variable like; 1.57 seconds.. (I think), does it? Thank you though. |
Yes it does, it gives up to 8 or 9 decimal places I believe.
|
Quote:
|
All times are GMT +2. The time now is 05:39 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.