Turtleflight BBS

Software for Active Worlds
It is currently Thu Sep 09, 2010 11:32 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: ~delay
PostPosted: Tue Aug 19, 2008 6:21 am 
Offline

Joined: Tue Mar 01, 2005 2:17 am
Posts: 2
So I was experimenting with the ~delay tag in RPG2 using the examples given in the object effects post, and I experienced some awkward results.
The exact syntax I used was " ~inv:lemon:2#4;~delay:120 " , so from what I gathered from the explanation I should get 2 to 4 lemons every 2 minutes.

The first time I click on the object it gives me some lemons, but consistently more then 4...I got 6, 8, 5, and 7 and that was after actually having to move the object to get it to reset as another object, because even after the set amount of time it wasn’t letting me click again on it to get any lemons. I watched in the bot to see what it said when I clicked on it, and when it works the first time it says immediately after depositing into inventory, "clicked on changing object", and thereafter "clicked on deleted object"

I wasn't sure if its maybe my syntax? Or if it’s an actual bug of some sort.

Thanks,
Blue


Top
 Profile  
 
 Post subject: Re: ~delay
PostPosted: Tue Aug 19, 2008 3:29 pm 
Offline
Site Admin

Joined: Fri Jan 24, 2003 9:30 pm
Posts: 371
Location: far out there
Nope, 2#4 doesn't mean a random number from 2 to 4. It means the same as "2d4" in tabletop role-playing games; that is, the same as rolling two four-sided dice. So the result would be from 2 to 8, with the average result being 5.

To get from 2 to 4, you would specify 1#3+1.

The "clicked on changing" and "clicked on deleted" messages just mean that the click was ignored because you clicked too soon. It's similar to what would happen if you clicked very quickly on an item that you were picking up; all but the first click would be ignored because the object would already have been deleted as far as the GM was concerned, even if it still showed in your AWB for a few seconds.

I'll check the delay time. Maybe the object didn't get released from the "deleted" list, so that it could be clicked again. Did you move the object before the delay time was up? That could have confused things, when the bot tried to change the object to allow it to be clicked again, after the delay time ended.


Top
 Profile  
 
 Post subject: Re: ~delay
PostPosted: Tue Aug 19, 2008 4:09 pm 
Offline
Site Admin

Joined: Fri Jan 24, 2003 9:30 pm
Posts: 371
Location: far out there
Ok, I see the problem. The ~inv tag is trying to delete the object while the ~delay tag is trying to change it. Since you don't want the object to be deleted, you should also put ~del:0 on it, like ~inv:lemon:1#3+1;~delay:120;~del:0.

However, it doesn't make much sense for the object to ever be deleted if it has ~delay on it, so I will also change the script so that the ~del:0 will automatically be inferred on any object that also has ~delay, so then it won't be necessary to have the ~del:0 tag.

(Also, right, my example didn't show the ~del:0 tag.)


Top
 Profile  
 
 Post subject: Re: ~delay
PostPosted: Tue Aug 19, 2008 7:24 pm 
Offline

Joined: Tue Mar 01, 2005 2:17 am
Posts: 2
Works like a champ now, Thanks. I was thinking about the *#* format and a discussion we had years ago about the concept of it being like a "roll" playing board game, but what I think got me was something you have in the documentation under conditional execution in object tags
Quote:
For example, a chicken object might have ~inv:egg:1#4;~delay:86400 on it, so that a player who clicks on the chicken gets 1 to 4 eggs
Same thing with the ~del tag, it implies its not needed in the docs, though now you changed it, what’s there makes perfect sense. Looking at it working now I may have caused some of my own issues by remaking the object, though I’m pretty sure I waited past the time I had set.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group