my jump + demo code: )

The general catch-all forum for Action Quake2 related discussions.

Moderator: Moderators

Post Reply
sanity
was in the wrong place
Posts: 267
Joined: Sun Aug 29, 2004 1:15 pm
Location: se
Contact:

my jump + demo code: )

Post by sanity »

Hello, I was bored and made these jumps:
http://www.wh00s.net/jump0r.zip (!! UPDATED !!)
those are not hard, cuz I could make them :D

anyway I made this code to:

Code: Select all

set demovalue 1
bind c "demo1" 
alias demo1 "record demo_$demovalue .dm2;bind c demo2" 
alias demo2 "stop;inc demovalue 1;bind c demo1"
bind v "set demovalue 1"
so this is what happens:
first it sets the variable demovalue to 1 (that should be at top)

and then it binds the button c to the alias demo1

and the alias demo1 records a demo with the name "demo_1.dm2" at this point, cuz it uses the variable which is set to 1, and then it binds button c to alias demo2

alias demo2 stops the demo and increases the variable demovalue with 1 step (if the variable is 3, it increases to 4), and binds button c to alias demo1 again, now the variable demovalue has a value of 2, cuz it has been increased...and it will go on...so u wont overwrite any demos hehe : p

and why its a space in "demo_$demovalue .dm2" is becuz if it wouldnt be any space, it would name the file: demo_.dm2 for some reason, tried it :p with the space it will save it as: demo_1.dm2 ..so there wont be any space anyway :p

and if u re-execute the cfg it will set the demovalue to 1, and it will go over again 1,2,3,4...
:D
gl

AprQ2 is needed cuz it got the command "inc" :p I dont know about nocheat or anything...but aprq2 latest worx

EDIT: press button v and it will reset the variable demovalue, so it starts over again with demo_1.dm2
Last edited by sanity on Sat Feb 12, 2005 2:42 pm, edited 5 times in total.
Image
Image
Haudrauf
tripped on its own grenade
Posts: 331
Joined: Tue Aug 26, 2003 11:20 am
Location: de
Contact:

Post by Haudrauf »

you forgot to say that AprQuake is required for "inc" to work.

Does NoCheat haveQ "inc" too?
R1Q2 does not have inc.
Last edited by Haudrauf on Sat Feb 12, 2005 12:29 pm, edited 1 time in total.
ImageOwner of http://aq2maps.quadaver.org
Not part of #aq2admins for a reason.
sanity
was in the wrong place
Posts: 267
Joined: Sun Aug 29, 2004 1:15 pm
Location: se
Contact:

Post by sanity »

k, edited :D
Image
Image
Serpent
hit the ground hard, real hard
Posts: 77
Joined: Mon Mar 22, 2004 8:16 pm
Location: fi
Contact:

Re: my jump + demo code: )

Post by Serpent »

sanity wrote: and why its a space in "demo_$demovalue .dm2" is becuz if it wouldnt be any space, it would name the file: demo_.dm2 for some reason, tried it :p with the space it will save it as: demo_1.dm2 ..so there wont be any space anyway :p
when recording demos you don't need that .dm2 there...
Serpent
• Moderator of AQ2Suomi • 4Ðm!n ov AQ2 Liiga •
sanity
was in the wrong place
Posts: 267
Joined: Sun Aug 29, 2004 1:15 pm
Location: se
Contact:

Post by sanity »

u are so right:o, why didnt I think of it:IO
but it doesnt seem to record to: demo_1.dm2.dm2 anyway :S
Image
Image
Diivil
joined the game
Posts: 26
Joined: Sun Aug 29, 2004 2:11 pm
Location: fi
Contact:

Post by Diivil »

sanity wrote:u are so right:o, why didnt I think of it:IO
but it doesnt seem to record to: demo_1.dm2.dm2 anyway :S
Useless comment: nocheat does. But as this only works with aprgauge, who gives a shit.
C
emu
Syndrome of a Down
Posts: 1444
Joined: Thu Jul 31, 2003 10:38 pm
Location: no
Contact:

Post by emu »

:sleep:
Call me your valentine call me once tonight
Span
sank like a rock
Posts: 106
Joined: Mon Aug 30, 2004 4:54 am
Location: no
Contact:

Post by Span »

Doesn't vanilla aq2 come with a similar script to that one? It maxes out at 10 tho, so I guess this works if you are ever to record more than 10 demos during one gaming session :)
"fifan va lätt!"
imeiz
is legless
Posts: 551
Joined: Sun Aug 29, 2004 1:46 pm
Location: et

Post by imeiz »

Span wrote:Doesn't vanilla aq2 come with a similar script to that one? It maxes out at 10 tho, so I guess this works if you are ever to record more than 10 demos during one gaming session :)
don't remember about windows, but on apr's linux version(1.17) the clients starts recording a new .dm2 after you type stop :p you'll need

Code: Select all

set cl_autorecord 1
set cl_recordatmatchstart 1
in your cfg :)
Sync' imeiz - AQ2Suomi & AQ2World forum moderator, part-time TATM-writer
Caracol
was picked off
Posts: 1152
Joined: Wed Sep 01, 2004 8:11 am
Location: cl
Contact:

Post by Caracol »

Span wrote:Doesn't vanilla aq2 come with a similar script to that one? It maxes out at 10 tho, so I guess this works if you are ever to record more than 10 demos during one gaming session :)
Maybe you mean this one?

Code: Select all

//demo recording
alias demstop1 "stop; echo Current Demo Stopped;wait;wait;wait;demstop2"
alias demstop2 "echo Press 'o' again to start next demo in sequence"
alias dem1 "echo Starting Demo1; record demo01; alias next_demo dem2"
alias dem2 "echo Starting Demo2; record demo02; alias next_demo dem3"
alias dem3 "echo Starting Demo3; record demo03; alias next_demo dem4"
alias dem4 "echo Starting Demo4; record demo04; alias next_demo dem5"
alias dem5 "echo Starting Demo5; record demo05; alias next_demo dem6"
alias dem6 "echo Starting Demo6; record demo06; alias next_demo dem7"
alias dem7 "echo Starting Demo7; record demo07; alias next_demo dem8"
alias dem8 "echo Starting Demo8; record demo08; alias next_demo dem9"
alias dem9 "echo Starting Demo9; record demo09; alias next_demo dem0"
alias dem0 "echo Starting Demo10; record demo10; alias next_demo demempty1"
alias demempty1 "echo You have exhausted this session's queue!;wait;wait;wait;wait; demempty2"
alias demempty2 "echo You must exit and archive existing demos before //recording more"
alias next_demo dem1

bind p "demstop1"
bind o next_demo
Pretty useful if you ask me, in fact, I've never used the comand record without a script or something else.
Cheers,

C.
Ne quid nimis.
bail
should have used a smaller gun
Posts: 379
Joined: Sun Aug 29, 2004 1:35 pm
Location: se

Post by bail »

Code: Select all

//demo recording
alias demstop1 "stop; echo Current Demo Stopped;wait;wait;wait;demstop2"
alias demstop2 "echo Press 'o' again to start next demo in sequence"
alias dem1 "echo Starting Demo1; record demo01; alias next_demo dem2"
alias dem2 "echo Starting Demo2; record demo02; alias next_demo dem3"
alias dem3 "echo Starting Demo3; record demo03; alias next_demo dem4"
alias dem4 "echo Starting Demo4; record demo04; alias next_demo dem5"
alias dem5 "echo Starting Demo5; record demo05; alias next_demo dem6"
alias dem6 "echo Starting Demo6; record demo06; alias next_demo dem7"
alias dem7 "echo Starting Demo7; record demo07; alias next_demo dem8"
alias dem8 "echo Starting Demo8; record demo08; alias next_demo dem9"
alias dem9 "echo Starting Demo9; record demo09; alias next_demo dem0"
alias dem0 "echo Starting Demo10; record demo10; alias next_demo demempty1"
alias demempty1 "echo You have exhausted this session's queue!;wait;wait;wait;wait; demempty2"
alias demempty2 "echo You must exit and archive existing demos before //recording more"
alias next_demo dem1

bind p "demstop1"
bind o next_demo

thats the one i have in my cfg and those binds too :D
i think that demorecord code always been in my cfg
and o and p are nice binds for demo recording :I
bail{UNi}
aztecx
sank like a rock
Posts: 110
Joined: Thu Sep 16, 2004 9:50 pm
Location: au

Post by aztecx »

thats just fucking stupid

bind f3 "record z1"
bind f4 "stop"
when u get the jump
bind f4 "record z2"
n99
"Sticks and Stones..."
Posts: 882
Joined: Sat Jun 05, 2004 6:41 pm
Location: nl

Post by n99 »

So let me get this straight. Either a) you exit aq2 after you recorded something you look and change the filename so it doesn't get overwritten OR b) u sit down and rebind? Seems a bit silly to me. Auterecord for the win, but the scripts are pretty useful.
Gore Vidal: "To succeed is not enough. Others must fail."
aztecx
sank like a rock
Posts: 110
Joined: Thu Sep 16, 2004 9:50 pm
Location: au

Post by aztecx »

what is auterecord? yeh i just rebind it. easy

bind f3 "record b2"

i type it in like 2 secs and i do it at the end of the round.

with that u gotta rename demos all that other shit with this u just change to c1 :)
n99
"Sticks and Stones..."
Posts: 882
Joined: Sat Jun 05, 2004 6:41 pm
Location: nl

Post by n99 »

aztecx wrote:what is auterecord? yeh i just rebind it. easy

bind f3 "record b2"

i type it in like 2 secs and i do it at the end of the round.

with that u gotta rename demos all that other shit with this u just change to c1
Well renaming is easy I go go like F2 to rename it to fornicate.dm2.

I type it like in 2 secs and I do it end the of an AQ2 session.

See any similarities? I just don't like rebinding during play and scripting during play is even worse..

Anyway, with auto-record your demo gets date-map-time stamped whatever. Usually it starts recording at the start of a new map, but you can also use 'triggers' in certain clients. So in the example mentioned above I could have this script automatically start recording if I mentioned 'fornication'...
Gore Vidal: "To succeed is not enough. Others must fail."
Post Reply