Inside3D!
     

[beta release] Return to Nameless City
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Sun Feb 28, 2010 12:08 am    Post subject: Reply with quote

Oh, I just meant that I should have thought of stuffcmd - hence the facepalm.

I'm thinking to do this inside a trigger, as well as the automatic quickloading on death. Every mod should have this.
_________________
ReMakeQuake
The Realm of Blog Magic
Back to top
View user's profile Send private message
Scrama



Joined: 28 Aug 2009
Posts: 20
Location: Siberia, Omsk

PostPosted: Mon Mar 01, 2010 5:41 am    Post subject: Reply with quote

items.qc
Code:
void() key_touch =
{
   if (other.classname != "player")
      return;
   if (other.health <= 0)
      return;
   if (other.items & self.items)
      return;

   sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM);
   stuffcmd (other, "bf\n");
   other.items = other.items | self.items;

   // Scrama: auto save games on old maps
   // rtnc maps should use trigger_autosave
   if (!world.frags)
      SUB_AutoSave();

   sprint (other, "You got the ");
   sprint (other, self.netname);
   sprint (other,"\n");

   activator = other;
   SUB_UseTargets();            // fire all targets / killtargets
   if (!coop)
      remove(self);
};

and somewere
Code:
void () SUB_AutoSave =
{
   if (coop||deathmatch)
      return;
      
   localcmd("save auto\n");
   game_autosaved = 1;
}

client.qc
Code:
void() respawn =
{
   if ((intermission_running)&&((coop)||(deathmatch)))  // not allowed during intermission
      return;

   if (coop)
   {
      // make a copy of the dead body for appearances sake
      CopyToBodyQue (self);
      //   save weapons and ammo
      // get the spawn parms as they were at level start
      setspawnparms (self);
      // respawn
      PutClientInServer ();
   }
   else if (deathmatch)
   {
      // make a copy of the dead body for appearances sake
      CopyToBodyQue (self);
      // set default spawn parms
      SetNewParms ();
      // respawn      
      PutClientInServer ();
   }
   else
   {   // restart the entire server
      if (game_autosaved)
         localcmd ("load auto\n");
      else
         localcmd ("restart\n");
   }
};


Dr. Shadowborg +1 =)
Back to top
View user's profile Send private message
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Mon Mar 01, 2010 6:13 am    Post subject: Reply with quote

Thanks.

I'm going to use an autosaving trigger in strategic spots of RMQ Episode 1 - one of its trademarks are "traps", so this will come in handy. Smile
_________________
ReMakeQuake
The Realm of Blog Magic
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> General Discussion All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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