PDA

View Full Version : speedboosttime


Ryan
11-17-2007, 03:11 PM
I wanted to make a script that would change the "Field of View" smoothly from 90 to 110 so it would look like a speed increase.

(Would also be cool in addition to the original bullettime script made by Joe999 hence I used the same approach)

But I need some help with the script.



// set SpeedBoostInOnce "g_fov 90;vstr btP;g_fov 91;vstr btP;g_fov 92;vstr btP;g_fov 93;vstr btP;g_fov 94;vstr btP;g_fov 95;
vstr btP;g_fov 96;vstr btP;g_fov 97;vstr btP;g_fov 98;vstr btP;g_fov 99;vstr btP;g_fov 100;vstr btP;g_fov 101;vstr btP;
g_fov 102;vstr btP;g_fov 103;vstr btP;g_fov 104;vstr btP;g_fov 105;vstr btP;g_fov 106;vstr btP;g_fov 107;vstr btP;
g_fov 108;vstr btP;g_fov 109;vstr btP;g_fov 110;vstr btP;g_fov 111;vstr btP;g_fov 112;vstr btP;g_fov 113;vstr btP;
g_fov 114;vstr btP;g_fov 115;vstr btP;g_fov 114;vstr btP;g_fov 113;vstr btP;g_fov 112;vstr btP;g_fov 111;vstr btP;g_fov 110"

// set SpeedBoostPerform "g_fov 110; vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;
vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;"

// set SpeedBoostOut "g_fov 110;g_fov 110;g_fov 109;g_fov 109;g_fov 108;g_fov 108;g_fov 107;g_fov 107;g_fov 106;g_fov 106;
g_fov 105;g_fov 105;g_fov 104;g_fov 104;g_fov 103;g_fov 103;g_fov 102;g_fov 102;g_fov 101;g_fov 101;g_fov 100;g_fov 100;
g_fov 99;g_fov 99;g_fov 98;g_fov 98;g_fov 97;g_fov 97;g_fov 96;g_fov 96;g_fov 95;g_fov 95;g_fov 94;g_fov 94;g_fov 93;
g_fov 93;g_fov 92;g_fov 92;g_fov 91;g_fov 91;g_fov 90"

set btP "wait;wait;wait;wait;wait;wait;wait;wait;wait;wait; wait;wait;wait;wait;wait;wait;wait;wait;wait;wait; wait;wait;
wait;wait;wait;wait;wait;wait;wait;wait;wait;wait; wait;wait;wait;wait;wait;wait;wait;"

set SpeedBoostInOnce "g_fov 90;vstr btP;g_fov 91;vstr btP;g_fov 92;vstr btP;g_fov 93;vstr btP;g_fov 94;vstr btP;g_fov 95;
vstr btP;g_fov 96;vstr btP;g_fov 97;vstr btP;g_fov 98;vstr btP;g_fov 99;vstr btP;g_fov 100;vstr btP;g_fov 101;vstr btP;
g_fov 102;vstr btP;g_fov 103;vstr btP;g_fov 104;vstr btP;g_fov 105;vstr btP;g_fov 106;vstr btP;g_fov 107;vstr btP;
g_fov 108;vstr btP;g_fov 109;vstr btP;g_fov 110"

set SpeedBoostPerform "vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;
vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;"

bind "alt" "vstr SpeedBoostIn; vstr SpeedBoostPerform "


First I didn't use the "vstr btP" and then the g_fov WOULD change from 90 to 110, but just in a single frame.
But now when I place the "vstr btP" between every "g_fov value" the g_fov doesn't change and I just have to wait some
time before I can change it manualy. (Same as in the bullettime script where you have to wait before the bullettime is over)

So I CAN change the g_fov this hard way (easier way is to toggle) but I want it to run smoothly and the wait command (vstr btP) does not seem to work.

Could someone help me with this?

Boumy
11-17-2007, 06:53 PM
OMG ! :eek:


set btP "wait;wait;wait;wait;wait;wait;wait;wait;wait;wait ;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait ;wait;wait;
wait;wait;wait;wait;wait;wait;wait;wait;wait;wait; wait;wait;wait;wait;wait;wait;wait;"

=> set btP "wait 40"

But you have to know that "wait 40" would wait 40 frames, so the time depend of your FPS.


set SpeedBoostPerform "vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;
vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;vstr btP;"

=>set SpeedBoostPerform "wait 800"

But it's not a good solution.
Imagine you want wait more than 800 frames ? Or less ? How can you do ?
An other problem is when you press many times the key. Computer will wait 800+800+...+800 frames. It's result of a freeze of the computer depending the number of time you press the key.

This is that you said :
But now when I place the "vstr btP" between every "g_fov value" the g_fov doesn't change and I just have to wait some
time before I can change it manualy.


I will try some script to improve yours.

edit :

Ok try it :


set FovZoom1 "g_fov 90;wait 2;g_fov 92;wait 2;g_fov 94;wait 2;g_fov 96;
wait 2;g_fov 98;wait 2;g_fov 100;wait 2;g_fov 102;wait 2;g_fov 104;wait 2;
g_fov 106;wait 2;g_fov 108;wait 2;g_fov 110; bind ALT $FovZoom2"

set FovZoom2 "g_fov 110;wait 2;g_fov 108;wait 2;g_fov 106;wait 2;g_fov 104;
wait 2;g_fov 102;wait 2;g_fov 100;wait 2;g_fov 98;wait 2;g_fov 96;wait 2;
g_fov 94;wait 2;g_fov 92;wait 2;g_fov 90; bind ALT $FovZoom1"

bind ALT $FovZoom1

Ryan
11-17-2007, 09:45 PM
Thanks dude :D

I will try as soon as possible

thank you very much, I appreciate it!
Downloading script now..
I will let u know how it works :dance:


(Forgive me, I am just a newbie at scripting, still trying to learn ;))

Ryan
11-17-2007, 09:55 PM
It works! :)

One minor thingy; it zooms out immediatly
and it says FovZoom1 (and/or) FovZoom2 can't be changed in mutliplayer.

But besides that it's great :)
FovZoom2 could come right behind 1, after a dely of some seconds tough.

I can tweak some things with how fast I want it to zoom in and out and how long it will last.
(I guess a steady 60 fps should be the standard )

I could use this script for a map I am planning to make where you get shot into space with a shuttle through a launchtube.
This would give a perception of going even faster :)
Thanks man!
(Maybe I can trigger this script in the map who knows)

I will let you know about any tweaks and additions to it!

P.S.:
(I guess this would be cool in combination with the bullettime script, altough that script does not rely on the ammount of frames but the amount of seconds pass before the effect takes off. You ever seen that script Boumy?)

Boumy
11-17-2007, 10:39 PM
Yes I know this script (http://community.enemyterritory.com/forums/showthread.php?t=15777) fur bullet time.

I will try to combine the two.
Think the more difficult will be to synchronize "wait" time this frame.

PS : If your intresting by a full cfg to watch replay, here mine (http://community.enemyterritory.com/forums/showthread.php?p=167143#post167143) (the last one to the bottom)

Ryan
11-18-2007, 10:17 AM
I tried to combine the two, could you tell me what I am doing wrong?
I attached it

Ryan
11-25-2007, 12:00 AM
Bump bump bump