Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Need help with sub timers..
Need help with sub timers..
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Spike
(27 posts) Bio
|
Date
| Sat 25 Sep 2004 05:56 AM (UTC) Amended on Sat 25 Sep 2004 06:01 AM (UTC) by Spike
|
Message
| Ok...I just got sub timers down, thou I'm trying to make it so you can stack them. For instance say the code was for a dig command. If the player spammed it 10 times it would simply wait for the first sub_timer to finish, then move on to the next untill it's done all ten times. Or if the player spammed dig 10 times then typed save, it would correctly go through the dig sub timer ten times, then save...cant figure out how to do this kinda new to timers and all...but I have no ideas. Hope someone can shed some light on this for me, thanks.
edit- I tried to simply remove the return from sub_timer do abort like this:
case SUB_TIMER_DO_ABORT:
ch->substate = SUB_TIMER_CANT_ABORT;
//return;
..while the commands went through..they just spammed out quickly ignoring the timer portion.
| Top |
|
Posted by
| Spike
(27 posts) Bio
|
Date
| Reply #1 on Sun 26 Sep 2004 02:25 PM (UTC) |
Message
| Anyone with any ideas on this one? | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #2 on Sun 26 Sep 2004 04:33 PM (UTC) |
Message
| I haven't done much with add_timer, but what you probably have to do is change how timers/substates are handled. It'll probably require changing the add_timer function and some others. Thats as much as I can think of right now. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Spike
(27 posts) Bio
|
Date
| Reply #3 on Mon 27 Sep 2004 11:51 AM (UTC) |
Message
| ..I figured as much, just needed to know a little past that. Guess I'll try to assign the timer that I need to know a type of number identifying them..and try to have the other functions work with that number instead of type...probably wont work but it's worth the try. | Top |
|
Posted by
| Greven
Canada (835 posts) Bio
|
Date
| Reply #4 on Mon 27 Sep 2004 12:56 PM (UTC) |
Message
| The problem, as I understand it, is that before the new timer is assigned during process of the command/skill, it first has to go through interp(), which is where the one command is interupted. Now, what you could do it have another type, something like TIMER_DO_FUN_MULTI, where if the original is of that type it is skipped when being disabled in interp, and then you could have the second one stack on top. |
Nobody ever expects the spanish inquisition!
darkwarriors.net:4848
http://darkwarriors.net | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
14,989 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top