Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@timer question
Author Message
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #1
@timer question
i have looked everywhere to see, but i cant find anything

what i need to know is if there is some way to see how many seconds are left in the @timer on an item so i can display @dclick of the item.

Code:
[ITEMDEF i_my_item]
id=i_gravestone_18

on=@dclick
if (<tag0.used> == 1)
src.sysmessage There are <timer> seconds left until this item can be used again
return 1
else
tag.used 1
timer 30
endif

on=@timer
tag.used 0

i want to display the seconds left until @timer fires where i have <time>

[Image: matts_siggy.gif]
(This post was last modified: 07-17-2013 11:58 PM by Rattlehead.)
07-17-2013 11:53 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: @timer question
Doesn't <timer> shows how many seconds are left ?_? I don't understand Shock
07-18-2013 12:05 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #3
RE: @timer question
oh really? damn i just made that up, i didnt know lol

ok, next question about my timer, say i wanted to do a countdown in a sysmessage firing every second without resetting the timer ,how would u suggest i managed that?

[Image: matts_siggy.gif]
(This post was last modified: 07-18-2013 12:30 AM by Rattlehead.)
07-18-2013 12:16 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #4
RE: @timer question
Code:
[function f_countdown]
if <argn> > 0
   sysmessage <argn>
   timerf 1,f_countdown <eval <argn> - 1 >
else
   sysmessage boom
endif
(This post was last modified: 07-18-2013 12:59 AM by Alaric.)
07-18-2013 12:58 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #5
RE: @timer question
yeah i didnt something similar but havent tested it yet, its pretty close to that, actually urs is alot better than mine lol, but i was hoping it worked, if yours does i will assume for now mine does as well

i am having a another issue tho

seems that using nested areadefs have limitations, for instance if i use a function to send messages to all clients in the parent area, anyone in the child areas do not receive the message, altho imo they are in the parent area still, so should receive the message, however they do not

[Image: matts_siggy.gif]
07-18-2013 02:39 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #6
RE: @timer question
Bigger area = UID(1)
I think, when you send something to bigger area, you send it everybody in region with UID(1). The smaller ones are ignored, because they have their own UIDs.

If I understand it well, the smaller areas just inherit properties/attributes/(whatever) but they delete a certain space in bigger area and create areas with their own UIDs and from this moment bigger area doesn't exist there, where smaller areas are defined.

That countdown is all yours, hope it works.. Smile
(This post was last modified: 07-18-2013 08:43 AM by Alaric.)
07-18-2013 04:43 AM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #7
RE: @timer question
Code:
[ITEMDEF i_my_item]
id=i_gravestone_18

on=@dclick
if (<DMOREY>)
src.sysmessage There are <timer> seconds left until this item can be used again
return 1
else
MOREY=30
timer 1
endif

on=@timer
if (<dmorey> > 0)
morey -=1
message <dmorey>
timer 1
else
timer -1
endif
return 1
(This post was last modified: 07-19-2013 05:45 PM by xwerswoodx.)
07-19-2013 05:44 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)