Need feature: exec a cfg at a certain time

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

Post Reply
Superboyy
Posts: 12
Joined: Mon May 31, 2004 4:23 pm

Need feature: exec a cfg at a certain time

Post by Superboyy »

Is there a way to implement a new command which executes a config at a certain time in game? Being able to do it while playing is a bad idea, because this would lead to many new lame scripts (like those third party dyna/spawn counters).

I'm thinking of a new b_demo command, which would allow me to execute a camera at a certain time (so i could run the same camera over the map many times). This would make it easier to correct the camera, or add special overlay effects (such as we see in R3 trailer movie for instance).

I'm aware that there is an exec_at_time command, but it doesnt do anything good because you need to specify the number of frames after which the config would execute, and that number overflows just a few seconds after you run the demo. What i'm thinking of is a command where you would specify a time. For example b_demo_exec_at 9:15 bla.cfg, and when that round timer hits 9:15 the bla.cfg would be executed.

Is such a feature possible?
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

actualy this is quite simpel done by a 3rd party program (not a hack)
Superboyy
Posts: 12
Joined: Mon May 31, 2004 4:23 pm

Post by Superboyy »

What program would that be? Well a lot of tools used for fragmovie production could be considered hack, so i dont really care :P
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Re: Need feature: exec a cfg at a certain time

Post by ReyalP »

Superboyy wrote: I'm aware that there is an exec_at_time command, but it doesnt do anything good because you need to specify the number of frames after which the config would execute, and that number overflows just a few seconds after you run the demo.
Huh ?

What do you mean it overflows ? If there is a bug in exec_at_time please report the bug, rather than suggesting a completely new feature.
send lawyers, guns and money
User avatar
EagleReloaded
Posts: 278
Joined: Fri Nov 19, 2004 9:15 pm
Location: Sydney, Australia

Post by EagleReloaded »

Exec_at_time works fine for me, but it would be nice if it could buffer more than one exec at a time.
Some people play tennis, I erode the human soul.
Superboyy
Posts: 12
Joined: Mon May 31, 2004 4:23 pm

Re: Need feature: exec a cfg at a certain time

Post by Superboyy »

ReyalP wrote:
Superboyy wrote: I'm aware that there is an exec_at_time command, but it doesnt do anything good because you need to specify the number of frames after which the config would execute, and that number overflows just a few seconds after you run the demo.
Huh ?

What do you mean it overflows ? If there is a bug in exec_at_time please report the bug, rather than suggesting a completely new feature.
Correct me if i'm wrong, but when using exec_at_time you need to input at what frame of the demo a config is executed. I dont know what those frames are (they are not the frames rendered, maybe maxpackets used to record the demo?), so after a couple of seconds that number that number is so great that it doesn fit in the variable range. And when entering a number such as 10000000000 it says something like: frame -72828312 has already passed.
Or maybe there is an alternative way of using it?
User avatar
zinx
Posts: 267
Joined: Fri Jan 16, 2004 12:37 pm
Location: US
Contact:

Post by zinx »

The general maximum for the number of frames per second in a demo is 333FPS, at this framerate it would take a demo that is over 1791 hours to overflow the frame counter. If you have a demo with a higher framerate, I STRONGLY recommend that you limit your framerate to 333FPS. If you're hitting the 1791 hour mark, I STRONGLY recommend that you seek professional help.
Zinx Verituse http://zinx.xmms.org/
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

Superboyy wrote:What program would that be? Well a lot of tools used for fragmovie production could be considered hack, so i dont really care :P
well i was just thinking of sending a cmd to the hidden windows conosle every x seconds
Superboyy
Posts: 12
Joined: Mon May 31, 2004 4:23 pm

Post by Superboyy »

zinx wrote:The general maximum for the number of frames per second in a demo is 333FPS, at this framerate it would take a demo that is over 1791 hours to overflow the frame counter. If you have a demo with a higher framerate, I STRONGLY recommend that you limit your framerate to 333FPS. If you're hitting the 1791 hour mark, I STRONGLY recommend that you seek professional help.
Ok this shot was take just a couple of seconds after running the demo:
Image
Considering your theory, 100000 frames should cover 5 minutes of a demo, but in my case it doesnt. By limiting framerate you mean com_maxfps? I've tried setting it to 1, but its still the same. So i should seek professional help now? :)
User avatar
zinx
Posts: 267
Joined: Fri Jan 16, 2004 12:37 pm
Location: US
Contact:

Post by zinx »

Sorry, looks like it's not based on frames, but rather time (hey, I didn't code it!). It's based on server time - which can't wrap anyway (because the server will restart if it tries to).

So it's in milliseconds, measured from the start (or restart) of the server the demo was recorded on.

I might be willing to add an exec_at_frame, but the wrapping issue is not valid, and will not be "fixed".
Zinx Verituse http://zinx.xmms.org/
Superboyy
Posts: 12
Joined: Mon May 31, 2004 4:23 pm

Post by Superboyy »

zinx wrote:I might be willing to add an exec_at_frame, but the wrapping issue is not valid, and will not be "fixed".
Sounds good. But do you think a command measuring miliseconds instead of frames would be possible? It's just a practical issue, so we wouldnt have to calculate :)
User avatar
Lagger
Posts: 316
Joined: Mon Sep 29, 2003 8:30 am

Post by Lagger »

A command that dumped the current server time to console would be a very useful feature.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

Lagger wrote:A command that dumped the current server time to console would be a very useful feature.
lua it :p
Post Reply