![]() |
tenths of a second timer - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: tenths of a second timer (/Thread-tenths-of-a-second-timer) |
tenths of a second timer - ChaveS - 11-16-2012 03:47 AM Just thought now... i heard sphere cannot deal with decimal timers because it dont and thats it... But how it can deal with decimal timers in spells/skills? And more... any idea to use an custom spell/skill to provide a way to do this? A skill or spell running on the char backgroud which dont cancel other skills/spell? RE: tenths of a second timer - Mordaunt - 11-16-2012 06:13 AM dtimer runs a timer in 10ths of a second RE: tenths of a second timer - ChaveS - 11-16-2012 08:45 AM testing You mean timerd? timerd here 1 is the same of 0.5, 0.4, 0.3 etc...( as i remeber, years ago i treid to use and gave up) I think when you put 0 to 0.4 it runs as timer 0, when u put 0.4 to 0.9, timer will be 1 second, something like that No differences EDIT: i made the tests Code: [FUNCTION timerdt] //sendpacket 0A2 D01a4b6 w120 w100 It is so unstable: Not always they appeared on same standard: example, sometimes it appears 1 and 2 instant, then 3 4 and 5 togheter. Sometimes all of them together And look, they even change the order: ![]() Second test: Sometimes 1, 2 and 3 instant, then one second later, then 4, 5, 6 ,7 instant. Sometimes 1, 2 instant, then one second later 3, 4, 5, 6 ,7 instant. Sometimes 1, 2 ,3, 4 instant, then one second later 5, 6 ,7 instant. very very unstable With a local connection. using serv.time to test: Code: [FUNCTION timerdt] Completely different numbers each time, many variations: ![]() unusable RE: tenths of a second timer - Skul - 11-16-2012 01:09 PM Problem being character objects don't 'run' on tenths of seconds, for instance, if you do .xshow timer on a character it will show the result in seconds. An item object's timer can run in tenths of a second only if it is not on a character, so in other words it must be placed on the ground and it must be outside of a container (or character). Strange but that's just the way sphere works with timerd. So you'll need to create your memory object and place it on the ground, link it to your player and run your code off @timer. Example: Code: [function test_timerd] RE: tenths of a second timer - Mordaunt - 11-16-2012 11:01 PM Yeah sorry I did mean timerd. You could use Serv.time which is global and does run in tenths RE: tenths of a second timer - Barnabus - 11-17-2012 03:20 AM (11-16-2012 01:09 PM)Skul Wrote: Problem being character objects don't 'run' on tenths of seconds, for instance, if you do .xshow timer on a character it will show the result in seconds. Thats good to know ^^ RE: tenths of a second timer - ChaveS - 11-24-2012 04:29 AM thanks |