request help! autosave system
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
request help! autosave system
hello everyone,
I just have a question, anyone know how to add an autosave system?
Actually I am working in a single player campaign project with Darkplaces engine.
thanks for your helping.
thorn3001
I just have a question, anyone know how to add an autosave system?
Actually I am working in a single player campaign project with Darkplaces engine.
thanks for your helping.
thorn3001
Thorn
-

thorn3001 - Posts: 29
- Joined: Tue Jun 28, 2011 6:09 am
- Location: Bogotá, Col
Re: request help! autosave system
add a trigger brush and have its touch function be
stuffcmd(other, "save autoSave");
someone feel free to correct me if im wrong. but im pretty sure that covers it.
stuffcmd(other, "save autoSave");
someone feel free to correct me if im wrong. but im pretty sure that covers it.
-

gnounc - Posts: 424
- Joined: Mon Apr 06, 2009 6:26 am
Re: request help! autosave system
You need to add some QuakeC code such as a trigger_autosave with a stuffcmd / localcmd.
i.e. something like this:
Add the trigger_autosave brush to your maps where you want your autosaves, then add some code to the stuff relating to dead players to autoload the autosave. (I'll let you figure out how to do the autoloading of your autosave)
EDIT: Oh darn. Ninja'd.
i.e. something like this:
- Code: Select all
void() trigger_autosave_touch =
{
if(other != player) // non-player entites can't trigger
return;
if(self.cnt == TRUE) // trigger only once
return;
self.cnt = TRUE;
localcmd("save autosave.sav\n");
};
void() trigger_autosave =
{
if(deathmatch || coop) // saving in multiplay and coop = bad.
{
remove(self);
return;
}
InitTrigger();
self.touch = trigger_autosave_touch;
};
Add the trigger_autosave brush to your maps where you want your autosaves, then add some code to the stuff relating to dead players to autoload the autosave. (I'll let you figure out how to do the autoloading of your autosave)
EDIT: Oh darn. Ninja'd.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest