Inside3D!
     

Demos at the end please!

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Tue Apr 05, 2005 2:03 pm    Post subject: Demos at the end please! Reply with quote

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.
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Wazat



Joined: 15 Oct 2004
Posts: 732
Location: Middle 'o the desert, USA

PostPosted: Tue Apr 05, 2005 3:10 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Tue Apr 05, 2005 3:57 pm    Post subject: Reply with quote

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

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...
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
LordHavoc



Joined: 05 Nov 2004
Posts: 243
Location: western Oregon, USA

PostPosted: Tue Apr 05, 2005 4:19 pm    Post subject: Re: Demos at the end please! Reply with quote

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).
Back to top
View user's profile Send private message Visit poster's website
Gilgamesh



Joined: 26 Oct 2004
Posts: 67
Location: Brazil

PostPosted: Tue Apr 05, 2005 6:18 pm    Post subject: Re: Demos at the end please! Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
ajay



Joined: 29 Oct 2004
Posts: 295
Location: Swindon, UK

PostPosted: Tue Apr 05, 2005 7:36 pm    Post subject: Reply with quote

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:

Quote:
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 Smile
_________________
my site
Back to top
View user's profile Send private message MSN Messenger
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Tue Apr 05, 2005 10:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Kools



Joined: 05 Jan 2005
Posts: 37
Location: The Netherlands

PostPosted: Sat Apr 09, 2005 1:31 pm    Post subject: Reply with quote

Keygrip works well for such things.
_________________
Forum lurker
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group