DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

In-Game Messages Tutorial - WSJ
Page 3 of 4 Goto page Previous  1, 2, 3, 4  Next
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Guest




Last Visit:





PostPosted: Sun May 08, 2005 4:38 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Can someone help me fix this error?

I got it when I installed the high rez tutorial (I forgot to mention that before)!
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Sun May 08, 2005 7:47 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I just tried the following feature combination: DarkOne's floors and ceilings, WSJ's In-Game Messages, Removing the scalers, High res textures and Fullscreen.
And everything works fine!
I uploaded the source here: ws_darkoneflce_hires_wsjmessages_fullscreen.zip
Please compare this source to your own to find your bug.
I'd suggest using this superb software to compare the files: Compare It!

Hope that helps
Guest




Last Visit:





PostPosted: Wed Jun 08, 2005 8:37 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey, I'm having an issue with this code...I put it in correctly, following all of the steps...I go to test it out, however, once I get a message to show up, I can no longer open any doors Sad

Any ideas on how this might be caused?
wolf3dbreaker
I am Death Incarnate
I am Death Incarnate


Joined: 09 Jun 2003
Last Visit: 29 Sep 2009

Topics: 31
Posts: 196
Location: Philippines
philippines.gif

PostPosted: Thu Jun 09, 2005 7:55 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Kuriboh72 wrote:
Hey, I'm having an issue with this code...I put it in correctly, following all of the steps...I go to test it out, however, once I get a message to show up, I can no longer open any doors

Any ideas on how this might be caused?


Did you hit 'compile' then 'make' then 'link' or did you just click on compile->link?

If not then try doing that. since we edited WL_DEF.H and the game seems to produce wierd bugs whenever we edit WL_DEF.H without hitting 'Make'

_________________
Gone from the community for a while. Will be back on July
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Fri Jul 08, 2005 8:15 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I modified the source code to have ingame messages, I put everything what WSJ written correctly, but at compiling, C++ shows the following message:

Compiling WL_MAIN.C
Error WL_DEF.H : Declaration terminated incorrectly

What could be the problem? I put that last routine into the VERY end of file, below the long line with many "=" symbols.

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Fri Jul 08, 2005 8:31 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If you're using WSJ's idea, your WL_DEF.H file should look like this:

::: CODE :::
   long      TimeCount,killx,killy;
   boolean      victoryflag;      // set during victory animations
   char      message[40];

} gametype;

::: CODE :::
void  FarScalePost (void);
void  GetMessage (char *lastmessage);
void  DrawMessage (void);


/*
=============================================================================

                   WL_STATE DEFINITIONS

Is what what yours looks like? Maybe your forgot a ";" or added something else there? Think
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Fri Jul 08, 2005 8:40 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, that two lines look like EXACTLY you've written. Below them, there was this:

void DrawMessage (void)
{
messagetime-=tics;

SETFONTCOLOR(0xf,0x0);
PrintX=8; PrintY=2;
US_Print(gamestate.message);
DrawAllPlayBorderSides ();
}

I erased it out. WSJ wrote that this must be inserted to avoid text appearance outside of the border. Where to add this then? WSJ mentioned the DrawMessage routine, but there wasn't more DrawMessage routines in WL_DEF.H apart from this.

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Fri Jul 08, 2005 9:10 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Reactor wrote:
Where to add this then? WSJ mentioned the DrawMessage routine, but there wasn't more DrawMessage routines in WL_DEF.H apart from this.

You won't find DrawMessage inside the source code at all because WSJ created it.
What you have to do is copy all that code from the box in his post into the very end of the WL_DRAW.C file (not WL_DEF.H).
It doesn't matter what's at the end of WL_DRAW.C, as long as you copy all that below it, you don't really have to look for anything.

The ending of your WL_DRAW.C file should look something like this:

::: CODE :::
   PM_NextFrame();

}


//===========================================================================

/*
========================
=
= GetMessage
=
= gets ingame messages
=
========================
*/

void GetMessage (char *lastmessage)
{
   messagetime = 150; // time for message to display

   strcpy(gamestate.message, lastmessage);
}   

/*
========================
=
= DrawMessage
=
= displays ingame messages
=
========================
*/

void DrawMessage (void)
{
   messagetime-=tics;

   fontnumber = 0;
   SETFONTCOLOR(0xf,0x0); // set the color
   PrintX=8; PrintY=2; // position the message
   US_Print(gamestate.message); // print message
    DrawAllPlayBorderSides ();
}

Unless you want to put it right before that "//====" bar of equal signs, but it doesn't realy matter. Simple eh? Smile
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Fri Jul 08, 2005 10:05 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I undestand now. So this

void DrawMessage (void)
{
messagetime-=tics;

SETFONTCOLOR(0xf,0x0);
PrintX=8; PrintY=2;
US_Print(gamestate.message);
DrawAllPlayBorderSides ();
}

WASN'T mean to place it at the upper region of the file! WSJ modified that long very-end code, and forgot to erase the code part mentioned above...I was confused Think

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Mon Jul 11, 2005 11:14 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hmm...I think it's finally working. I'll modify this post in case of further troubles.

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Reactor
DieHard SS
DieHard SS


Joined: 17 Mar 2005
Last Visit: 24 Jan 2013

Topics: 27
Posts: 328
Location: Hungary
hungary.gif

PostPosted: Mon Jul 11, 2005 12:37 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, I compiled the source, and built my new EXE. Everything seemed to be in order. Then I started the game, selected an episode and difficulty, and then the game bombed out to Windows with no error messages. Even the "Get psyched" screen hasn't appeared.

Do you have any idea,what could be the problem? I got no errors during compiling, and followed the tutorial...

_________________
INCOMING TRANSMISSION
"Marine! Er....never mind..."
TRANSMISSION ENDS
Nembo
Can I Play Daddy
Can I Play Daddy


Joined: 26 Feb 2006
Last Visit: 01 Oct 2017

Topics: 5
Posts: 35

usa.gif

PostPosted: Sun Feb 26, 2006 4:15 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hi this is my first post here, I am completely new to codeing so please have patience with me.

I followed the tutorial as according to WJS instructions on the first page or this thread, and it worked fine.
So I went and added another message for when you pick up the MP40. I compiled the Code and double
clicked on my new .exe and the black DOS box pops up and then DOS box closes, the program having turned
off.

After a while of trouble shooting I figured out that the .exe would only work if (1) all the messeges were the
same. or (2) I only had one message.

So my question is what am I doing wrong?
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Sun Feb 26, 2006 5:53 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I suspect "Abnormal program termination". Try the stuff listed here, and if that doesn't fix things then I'm all out of ideas. I'm guessing "Abnormal program termination" because I believe on an XP machine a DOS window will often close entirely once the program is done, not allowing you to read any messages produced.

_________________
Nembo
Can I Play Daddy
Can I Play Daddy


Joined: 26 Feb 2006
Last Visit: 01 Oct 2017

Topics: 5
Posts: 35

usa.gif

PostPosted: Sun Feb 26, 2006 6:14 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks, Dugtrio17.

I downloaded the files to help clear up memory and it works know.
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Sun Feb 26, 2006 6:31 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

No problem, if you need more memory then be sure to give this a look, too, though I recommend you read the whole thread before you do anything described in it. That and back up your source, of course.

_________________
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Tue Jun 06, 2006 7:00 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Um, i was installing this tut, and wondered, do we really need to define DrawMessages for ALL files? cudnt we just move the line from WL_DEF.H to WL_DRAW.C, as its only used there?

And i havnt tested, coz im attempting to move to 4GW, but wud it save memory?

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Thu Aug 03, 2006 11:02 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

In EoD, when you find a secret area, you get a message. Something like "You find a secret area". How do you enable this?
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Thu Aug 03, 2006 2:42 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Easy. Open up WL_AGENT.C and add something like this:

::: CODE :::
   if (*(mapsegs[1] + offset) == EXITTILE)
      VictoryTile ();

   if (*(mapsegs[1] + offset) == 1)
   {
      *(mapsegs[1] + offset) = 0;
      GetMessage("You find a secret area");
   }

}

Now just put object 1 on the map wherever you want the message to display when you walk over it (eg. in a secret passage).
Or do something else. Be creative! Like program the object to drop automatically somewhere near a pushwall while it's moving or something.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Fri Aug 04, 2006 2:22 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

That is actually pretty easy! Embarassed Thanks for helping!
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Mon Aug 07, 2006 4:49 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

But how do you add "You don't have that weapon"?
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Mon Aug 07, 2006 9:56 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@ronwolf1705: If you're still using the original weapon setup, try adding/changing the code in red (in WL_AGENT.C):

::: CODE :::
void CheckWeaponChange (void)
{
   int   i,buttons;

   if (!gamestate.ammo)      // must use knife with no ammo
   {
      GetMessage("You don't have any ammo for that weapon");

      return;
   }


   for (i=wp_knife ; i<=wp_chaingun ; i++)
      if (buttonstate[bt_readyknife+i-wp_knife])
      {
         if (i>gamestate.bestweapon)
         {
            GetMessage("You don't have this weapon");
            return;
         }

         gamestate.weapon = gamestate.chosenweapon = i;
         DrawWeapon ();
         return;
      }
}

You could also add something like the code in blue if you wanted, just to cover everything, but that's totally up to you.
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Mon Aug 07, 2006 10:11 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm using this function

::: CODE :::

void CheckWeaponChange (void)
{
    int i,buttons;
 switch (LastScan)
  {
  case 2:
   LastScan=0;
   if (gamestate.bestweapon >= wp_knife)
   gamestate.weapon = gamestate.chosenweapon = wp_knife;
   break;
  case 3:
   LastScan=0;
   if (gamestate.bestweapon >= wp_pistol)
   {
   gamestate.weapon = gamestate.chosenweapon = wp_pistol;
   DrawAmmo ();
   }
   break;
  case 4:
   LastScan=0;
   if (gamestate.bestweapon >= wp_machinegun)
   {
   gamestate.weapon = gamestate.chosenweapon = wp_machinegun;
   DrawAmmo ();
   }
   break;
  case 5:
   LastScan=0;
   if (gamestate.bestweapon >= wp_chaingun)
   {
   gamestate.weapon = gamestate.chosenweapon = wp_chaingun;
   DrawAmmo ();
   }
   break;
  case 6:
   LastScan=0;
   if (gamestate.bestweapon >= wp_plasma)
   {
   gamestate.weapon = gamestate.chosenweapon = wp_plasma;
   DrawAmmo ();
   }
   break;
  }
DrawWeapon();
    }
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Sun Aug 13, 2006 4:52 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Does anyone know how to help me?
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Thu Aug 17, 2006 9:06 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Nobody has a clue on how to add the "You don't have that weapon" message in the function that I posted?
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Thu Aug 17, 2006 9:22 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You could try this:

::: CODE :::

If(gamestate.bestweapon < wp_pistol)
{
   GetMessage("You don't have that weapon...");
}

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog
ronwolf1705
Moderator
<B>Moderator</B>


Joined: 31 Jul 2006
Last Visit: 9:48 ago.

Topics: 69
Posts: 3673

blank.gif

PostPosted: Thu Aug 17, 2006 9:31 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I don't think thats right. I tested it and when I started I had all weapons and when I selected a weapon the message showed up.
WLHack
DieHard Wolfer
DieHard Wolfer


Joined: 10 Jul 2005
Last Visit: 29 Mar 2017

Topics: 65
Posts: 1237
Location: Loppi - Finland
finland.gif

PostPosted: Thu Aug 17, 2006 9:33 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Strange... Hmm, I think I have to do some testing by myself.

_________________
False Spear download
False Spear SDL download
Wolfenstein-blog
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Mon Aug 21, 2006 9:34 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@ronwolf1705: That code you found looks pretty messy. What about using this instead?

::: CODE :::
void CheckWeaponChange (void)
{
   int   i,buttons;

   if (!gamestate.ammo)      // must use knife with no ammo
      return;

   for (i=wp_knife ; i<=wp_plasma ; i++)
      if (Keyboard[sc_1+i])
      {
         IN_ClearKeysDown();
         if (i>gamestate.bestweapon)
         {
            GetMessage("You don't have this weapon");
            return;
         }

         gamestate.weapon = gamestate.chosenweapon = i;
         DrawWeapon ();
         DrawAmmo();
         return;
      }
}

Or even something like this:

::: CODE :::
void CheckWeaponChange (void)
{
   int   i,buttons;

   if (!gamestate.ammo)      // must use knife with no ammo
      return;

   if (LastScan >= sc_1 && LastScan <= sc_5)

   {
      i = LastScan-sc_1;
      LastScan = 0;

      if (i>gamestate.bestweapon)
      {
         GetMessage("You don't have this weapon");
         return;
      }

      gamestate.weapon = gamestate.chosenweapon = i;
      DrawWeapon ();
      DrawAmmo();
   }
}

Now you can just change the "wp_plasma" or "sc_5" to something higher if you want to have more than 5 weapons.

Unlike buttonstate, LastScan and Keyboard[] don't get saved into demos though, but I guess that doesn't matter for most cases, since gun changing doesn't really work too well in demos recorded with 4 DEMOTICS (default setting) anyway. You probably don't need to add the DrawAmmo(); line I added in purple, unless you're using more than one ammo type, and if the drawing code for it is already in that function. I just added it in because it was in the original code you posted for some reason.
insurrectionman
DieHard Mutant
DieHard Mutant


Joined: 07 May 2005
Last Visit: 09 Dec 2017

Topics: 86
Posts: 752
Location: Wisconsin
usa.gif

PostPosted: Mon Aug 21, 2006 10:44 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Also in EOD they had the countdown timer, how can that be made? I'm guessing the coding would be very extensive.

_________________
I'm back! I missed this community!
Youtube Channel: TreeSapThief

New Site: http://www.treesapthief.com
Twitter: @treesapthief
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

Topics: 55
Posts: 2115
Location: Canada
blank.gif

PostPosted: Mon Aug 21, 2006 11:50 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

insurrectionman wrote:
Also in EOD they had the countdown timer, how can that be made? I'm guessing the coding would be very extensive.

Nah. You just need one variable to store the initial or final time.. then work off of it... like this...

- As player picks up object: finaltime = gamestate.TimeCount + seconds_to_count_down*70
- Running all the time: if (finaltime) { PrintX/Y/fontcolor/number=stuff; US_PrintUnsigned((finaltime-gamestate.TimeCount)/70))
- Running in that if statement: if (finaltime <= gamestate.TimeCount) finaltime=0; [insert extra whatever happends when time runs out]


Or something like that. But this is kind of off-topic, and there might be a thread about this already.
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 3 of 4 Goto page Previous  1, 2, 3, 4  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Add Text to Screen at Skill Level select - Chris
Author: Chris
3 2438 Tue Sep 28, 2010 6:59 pm
Tricob View latest post
No new posts [Code] Adding an Object that causes Damage - Chris
Author: Chris
4 1700 Sat Apr 24, 2004 7:53 pm
Guest View latest post
No new posts [Code] Split Hitler Boss into 2 Enemies - Adam Biser
Author: Adam Biser
4 1498 Mon Jan 05, 2004 12:13 pm
Adam Biser View latest post
No new posts [Code] Change Colour of Blocks on Signon - Adam
Author: Adam Biser
0 1001 Sun Jan 04, 2004 10:55 am
Adam Biser View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 607 Tue Jul 29, 2003 3:00 pm
Codetech84 View latest post
 
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


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group