Server Help

Bot Questions - One thing Im confused about...

Anonymous - Fri Oct 03, 2003 10:19 pm
Post subject: One thing Im confused about...
In mervbot:
I dont understand how time things, I mean, for example:

How do I do something every X seconds?
How do I do something X seconds after command !Y?

Some more I forgot, but any help would be great...[/list]
Cyan~Fire - Fri Oct 03, 2003 11:13 pm
Post subject:
Writing a dll?

In spawn.cpp look for EVENT_Tick, it triggers every second. There's also countdown[n], which decreases every second, so that's how you do #2.

Yay, I love it when the bot has built in features like this! icon_razz.gif
Anonymous - Fri Oct 03, 2003 11:24 pm
Post subject:
Okay, I got that part. Now, for the second: I was thinking I could set a timer to X seconds on !Y, but that would reset the timer each time someone did !Y, I need it for each person who does it....
Cyan~Fire - Sat Oct 04, 2003 10:37 pm
Post subject:
Set up a big countdown array? :-/
k0zy - Sun Oct 05, 2003 3:49 am
Post subject:
or "tag" the player using set_tag and get_tag
Cyan~Fire - Sun Oct 05, 2003 12:23 pm
Post subject:
And do a get_tag for every player in EVENT_Tick? I think that might be even more ineffecient.
k0zy - Sun Oct 05, 2003 1:39 pm
Post subject:
I didn't say it's more efficent... Maybe it is, maybe not.
But i consider tagging as more secure and clean.

Because, when u define a huge countdown array...
Let's say countdown[50], what if there are suddenly more then 50 ppl in one arena? And if there are only 20, not even half of the array is used.

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group