Demos at the end please!

Discuss programming in the QuakeC language.
Post Reply
ajay
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Demos at the end please!

Post by ajay »

Is it possible to play a number of demos at the end of a level/game etc - it would be right at the end, so nothing, parms etc, would need to be saved?

Thank you.

Me.
Wazat
Posts: 771
Joined: Fri Oct 15, 2004 9:50 pm
Location: Middle 'o the desert, USA

Post by Wazat »

Well, you can stuffcmd to the player "playdemo demoname", but after that it might be a fight to give control back to the player, since I don't think demos can initiate map changes, and once that demo is playing your current QC loses control.

Maybe you could do something like:
stuffcmd(player, "playdemo endingA; wait 330; map town");
which would presumably play the demo, wait 5 and a half minutes, and go to the town map.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

Wazat, you should know that demos can very well initate map changes, and whatnot :)

I'm not entirely sure how it's done, but I know some old mods do this. Best guess is that there's quite simply a "changelevel blah" at the end...
I was once a Quake modder
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Re: Demos at the end please!

Post by LordHavoc »

ajay wrote:Is it possible to play a number of demos at the end of a level/game etc - it would be right at the end, so nothing, parms etc, would need to be saved?

Thank you.

Me.
call stuffcmd at the end of the demo, that will write a svc_stuffcmd message into the demo which will do whatever you want, Nehahra used this to end its cutscenes and go back into the game (note: it stored all the parms off into cvars so they'd survive the cutscene, and restored them on entering the new level).
Gilgamesh
Posts: 67
Joined: Tue Oct 26, 2004 6:08 pm
Location: Brazil
Contact:

Re: Demos at the end please!

Post by Gilgamesh »

LordHavoc wrote:
ajay wrote:Is it possible to play a number of demos at the end of a level/game etc - it would be right at the end, so nothing, parms etc, would need to be saved?

Thank you.

Me.
call stuffcmd at the end of the demo, that will write a svc_stuffcmd message into the demo which will do whatever you want, Nehahra used this to end its cutscenes and go back into the game (note: it stored all the parms off into cvars so they'd survive the cutscene, and restored them on entering the new level).
So, if we use a alias like "demo_ended" and stuffcmd it, we can change it before the demo initiates, giving use a "reusable" demo? Nice!
#EOP
ajay
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Post by ajay »

Thanks everyone, I've got it running one demo, but I can't get it to return back to a level, or play another demo.
This is really interesting:
call stuffcmd at the end of the demo, that will write a svc_stuffcmd message into the demo
But although I partly get it, it's kind of outside of what I can freely write myself, could someone write an example?

Sorry and thanks :)
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

I believe making a demo call a map back is done via one of the demo utilities that have been released by third parties... basically, a 'map level' stuff can be added at the end of the demo. I think that's also how they did successions of demos (other than startdemos)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Kools
Posts: 38
Joined: Wed Jan 05, 2005 4:55 pm
Location: The Netherlands

Post by Kools »

Keygrip works well for such things.
Forum lurker
Post Reply