Inside3D!
     

Centerprint during intermission?

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



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Sat Jul 05, 2008 11:44 pm    Post subject: Centerprint during intermission? Reply with quote

Can this be done???
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Orion



Joined: 12 Jan 2007
Posts: 414
Location: Brazil

PostPosted: Sun Jul 06, 2008 1:24 am    Post subject: Reply with quote

Well, you should do some different stuff...
When you finish an episode in singleplayer, it writes a message.

It uses some of the WriteXXXX stuff, where WriteString() writes the string... I don't know too much about that.

You may check client.qc in the intermission functions, the mesages should be there, and put them somewhere like CheckRules() within timelimit/fraglimit statements...

EDIT: Not those messages, your messages created by yourself.

Use this:

Code:

WriteByte (MSG_ALL, SVC_FINALE);
WriteString (MSG_ALL, "Your message.\n");

_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Sun Jul 06, 2008 2:39 am    Post subject: Reply with quote

Shouldn't it be SVC_INTERMISSION not SVC_FINALE?

Here's what I have:

Code:
void() CheckRules =
{       
   if (timelimit && time >= timelimit)
      NextLevel ();
   
   if (fraglimit && self.frags >= fraglimit)
           {
                NextLevel ();
                WriteByte (MSG_ALL, SVC_FINALE);
                WriteString (MSG_ALL, "Your message.\n");
           }
};

I get an error message:
host_error: CL_ParseServerMessage: illegible server message

Any ideas???
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Orion



Joined: 12 Jan 2007
Posts: 414
Location: Brazil

PostPosted: Sun Jul 06, 2008 3:19 am    Post subject: Reply with quote

So remove these 2 lines from CheckRules().

Look for ExitIntermission() in client.qc, remove this:

Code:

// skip any text in deathmatch
   if (deathmatch)
   {
      GotoNextMap ();
      return;
   }


Then look for this right below:

Code:

if (intermission_running == 2)
   {
      if (world.model == "maps/e1m7.bsp")
      {
         WriteByte (MSG_ALL, SVC_CDTRACK);
         WriteByte (MSG_ALL, 2);
         WriteByte (MSG_ALL, 3);
         if (!cvar("registered"))
         {
            WriteByte (MSG_ALL, SVC_FINALE);
            WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task in the other three\nhaunted lands of Quake. Or are you? If\nyou don't register Quake, you'll never\nknow what awaits you in the Realm of\nBlack Magic, the Netherworld, and the\nElder World!");
         }
         else
         {
            WriteByte (MSG_ALL, SVC_FINALE);
            WriteString (MSG_ALL, "As the corpse of the monstrous entity\nChthon sinks back into the lava whence\nit rose, you grip the Rune of Earth\nMagic tightly. Now that you have\nconquered the Dimension of the Doomed,\nrealm of Earth Magic, you are ready to\ncomplete your task. A Rune of magic\npower lies at the end of each haunted\nland of Quake. Go forth, seek the\ntotality of the four Runes!");
         }
         return;
      }
      else if (world.model == "maps/e2m6.bsp")
      {
         WriteByte (MSG_ALL, SVC_CDTRACK);
         WriteByte (MSG_ALL, 2);
         WriteByte (MSG_ALL, 3);

         WriteByte (MSG_ALL, SVC_FINALE);
         WriteString (MSG_ALL, "The Rune of Black Magic throbs evilly in\nyour hand and whispers dark thoughts\ninto your brain. You learn the inmost\nlore of the Hell-Mother; Shub-Niggurath!\nYou now know that she is behind all the\nterrible plotting which has led to so\nmuch death and horror. But she is not\ninviolate! Armed with this Rune, you\nrealize that once all four Runes are\ncombined, the gate to Shub-Niggurath's\nPit will open, and you can face the\nWitch-Goddess herself in her frightful\notherworld cathedral.");
         return;
      }
      else if (world.model == "maps/e3m6.bsp")
      {
         WriteByte (MSG_ALL, SVC_CDTRACK);
         WriteByte (MSG_ALL, 2);
         WriteByte (MSG_ALL, 3);

         WriteByte (MSG_ALL, SVC_FINALE);
         WriteString (MSG_ALL, "The charred viscera of diabolic horrors\nbubble viscously as you seize the Rune\nof Hell Magic. Its heat scorches your\nhand, and its terrible secrets blight\nyour mind. Gathering the shreds of your\ncourage, you shake the devil's shackles\nfrom your soul, and become ever more\nhard and determined to destroy the\nhideous creatures whose mere existence\nthreatens the souls and psyches of all\nthe population of Earth.");
         return;
      }
      else if (world.model == "maps/e4m7.bsp")
      {
         WriteByte (MSG_ALL, SVC_CDTRACK);
         WriteByte (MSG_ALL, 2);
         WriteByte (MSG_ALL, 3);

         WriteByte (MSG_ALL, SVC_FINALE);
         WriteString (MSG_ALL, "Despite the awful might of the Elder\nWorld, you have achieved the Rune of\nElder Magic, capstone of all types of\narcane wisdom. Beyond good and evil,\nbeyond life and death, the Rune\npulsates, heavy with import. Patient and\npotent, the Elder Being Shub-Niggurath\nweaves her dire plans to clear off all\nlife from the Earth, and bring her own\nfoul offspring to our world! For all the\ndwellers in these nightmare dimensions\nare her descendants! Once all Runes of\nmagic power are united, the energy\nbehind them will blast open the Gateway\nto Shub-Niggurath, and you can travel\nthere to foil the Hell-Mother's plots\nin person.");
         return;
      }

      GotoNextMap();
   }


Replace all that stuff with this:

Code:

if (intermission_running == 2)
   {
      WriteByte (MSG_ALL, SVC_FINALE);
      WriteString (MSG_ALL, "Your message.\n");
      GotoNextMap();
   }


If it still crashes, try removing the SVC_FINALE WriteByte().

NOTE: This was not tested, so I don't know the results.
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Sun Jul 06, 2008 4:31 pm    Post subject: Reply with quote

Orion, I think the problem here is that I'm running QW.
I don't have those lines of code.
I don't have ExitIntermission().
I tried it in IntermissionThink () instead.

Code:
void() IntermissionThink =
{
   if (time - 8 < intermission_exittime)               //8 second delay
               {
                WriteByte (MSG_ALL, SVC_FINALE);
                WriteString (MSG_ALL, "\n\n\n\n\n\n\n\nYour message.\n");
                return;
               }


It didn't get an error, although the desired result was not achieved.
The players scores were no longer visible, and just the letter "Y" was in it's place. Hmmmmmm.
I want a message to print below the players scores during the intermission.
I guess this is one of those QW things.
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Orion



Joined: 12 Jan 2007
Posts: 414
Location: Brazil

PostPosted: Mon Jul 07, 2008 9:10 pm    Post subject: Reply with quote

Umm I think that's nearly impossible in QC... That's all hard-coded.
You would need to modify the engine's source code, where the language is different from QC... And I don't know how to compile en engine...
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Tue Jul 08, 2008 2:34 pm    Post subject: Reply with quote

ok, thanks anyway
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
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