Camera Scripting Question

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

Post Reply
cnav
Posts: 10
Joined: Sat Dec 13, 2003 9:47 am

Camera Scripting Question

Post by cnav »

This is a bit random, but I'm hoping somebody may be able to answer this question. I'm attempting to write my own config that will in essence be a camera script during demo playback. I'm very early on in this process and I've come to my first obvious question. I'm using commands like +freecam_turnleft, +freecam_turnright, +freecam_turnup, +freecam_turndown, +freecam_rollleft, +freecam_rollright...etc, yet I've hit a wall. When I write my config, the script executes all simultaneously. This is good for lines like "+freecam_rollleft; +freecam_turndown" or something like that, but when I want to do something simple like go forward for about 5 seconds, it dosen't go as expected. My questions is this, how do I time out these commands so that they will execute in some fashion in which I can time. IE "+forward for 4 seconds, +moveright for 2 seconds...etc"

I tried b_demo_freecamspeed, timescale and a few other things, but I can't get this to flow right still. Any ideas?
User avatar
Lagger
Posts: 316
Joined: Mon Sep 29, 2003 8:30 am

Post by Lagger »

cnav
Posts: 10
Joined: Sat Dec 13, 2003 9:47 am

Post by cnav »

Thats with GTK. I'm trying to do this without using that method. Its harder this way, but has alot more capabilities. I'm trying to encapsulate it in a .cfg file using just the freecam/movement commands.
Dersaidin
Posts: 197
Joined: Fri Aug 06, 2004 1:55 pm
Location: Australia

Post by Dersaidin »

Maybe use the wait command.
eg.

+forward
wait 400 //thats 4 seconds
-forward
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

Dersaidin wrote:wait 400 //thats 4 seconds
no, that's 200 frames (at 76fps, it's a little under 3 secs)
also remember you're very voulnerable during waits (you can't turn but you can strafe), don't know all the commands that are affected, but this is a big one
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
EagleReloaded
Posts: 278
Joined: Fri Nov 19, 2004 9:15 pm
Location: Sydney, Australia

Post by EagleReloaded »

I don't think vulnerability is an issue with a scripted camera ^_^
Some people play tennis, I erode the human soul.
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

:oops: sorry, just pointing some things out... habit
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

You should be able to do it with extensive use of exec_at_time
send lawyers, guns and money
cnav
Posts: 10
Joined: Sat Dec 13, 2003 9:47 am

Post by cnav »

Thanks, I think I got it :) Much appreciated.
Post Reply