Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Xinphinity
USA (26 posts) bio
|
| Date |
Mon 08 Apr 2002 08:17 PM (UTC) [ quote
] |
| Message |
Me again.
Okay here is the scenario. I get a message that says -
Roundtime: 6 seconds.
I know i can get, and am getting the numeric 6 into a var, but what I want to do is output to the screen in a countdown either
Roundtime: 6...5....4....3...2...1 Done.
Or, ick,
RoundTime: 6
5
4
3
2
1
Done
Any ideas or suggestions on this one?
~Xin | top |
|
| Posted by |
Magnum
Canada (580 posts) bio
|
| Date |
Reply #1 on Mon 08 Apr 2002 11:16 PM (UTC) [ quote
] |
| Message |
From the main mushclient page, click on the link to 'all functions'. It's on the left side, near the bottom.
On the next page, click the link to list them all alphabetically.
Check out World.AddTimer and World.Note. There are some related timer functions that will be listed when you check out AddTimer.
The tools lie there for you to learn about and use. ...or you could wait for someone to write the script here for you. I don't have time right now. |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | top |
|
| Posted by |
Nick Gammon
Australia (18,800 posts) bio
Forum Administrator |
| Date |
Reply #2 on Tue 09 Apr 2002 12:24 AM (UTC) [ quote
] Amended on Tue 09 Apr 2002 10:48 PM (UTC) by Nick Gammon
|
| Message |
You can use world.setstatus to put messages on the status line. This might be helpful here.
I would add a timer, that fires every second. This timer would query a variable (time to go), and draw on the status line. Then when the variable became negative, you would disable the timer.
eg.
dim secs
secs = world.getvariable ("seconds")
secs = secs - 1
if secs < 0 then
world.setstatus "Done"
world.enabletimer "thistimer", false ' disable timer
else
world.setstatus "Time to go = " & secs & " seconds"
world.setvariable "seconds", secs
end if
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Xinphinity
USA (26 posts) bio
|
| Date |
Reply #3 on Tue 09 Apr 2002 03:39 PM (UTC) [ quote
] |
| Message |
Nick that was just what I needed.
Except, *bops you*,
it's World.EnableTimer "timer", TRUE|FALSE!!
The code you posted crashed the Client...;)
No big deal the code was still just what i needed.
Thanks much.
~Xin | top |
|
| Posted by |
Nick Gammon
Australia (18,800 posts) bio
Forum Administrator |
| Date |
Reply #4 on Tue 09 Apr 2002 10:47 PM (UTC) [ quote
] |
| Message |
Ah that will teach me to code without testing first. :)
I'll amend the post. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
| Posted by |
Xinphinity
USA (26 posts) bio
|
| Date |
Reply #5 on Tue 09 Apr 2002 11:42 PM (UTC) [ quote
] |
| Message |
Well dont do it for me, it was no big deal and a big help.
;)
~Xin | 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.
2,150 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )