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 1 of 4 Goto page 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
jamez
I am Death Incarnate
I am Death Incarnate


Joined: 16 Mar 2003
Last Visit: 13 Aug 2016

Topics: 13
Posts: 186
Location: Yorkshire, UK
uk.gif

PostPosted: Tue Mar 02, 2004 1:19 pm
   Subject: [Help] Putting Floating Text (messages) on the Screen
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I've noticed that in End Of destiny screenshots it has text in the corner for secret areas...

I was just wondering if anyone can help me do this. I'm releasing something in a few weeks, and this would really help me...

_________________
~ James
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 04 Dec 2017

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Tue Mar 02, 2004 1:24 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I was thinking of adding this feature to DT to, it's amazing how great minds think a like Cool

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Raistlin
DieHard Guard
DieHard Guard


Joined: 22 Apr 2003
Last Visit: 18 Oct 2006

Topics: 24
Posts: 246

blank.gif

PostPosted: Tue Mar 02, 2004 1:39 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm actually working on it for "Killing hans Gruber"....

Laughing Laughing

Does anyone recall the post about having text displayed on
entering the level?

I was thinking of maybe modifying that a bit.

_________________
As I watched him on T.v, somehow it really bothered me...
jamez
I am Death Incarnate
I am Death Incarnate


Joined: 16 Mar 2003
Last Visit: 13 Aug 2016

Topics: 13
Posts: 186
Location: Yorkshire, UK
uk.gif

PostPosted: Tue Mar 02, 2004 1:43 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Haasboy wrote:
how great minds think a like


You wanna rule the world too? Razz

@Raistlin no it doesn't really as the game freezes when you try to use that. ANd its hard to see...

_________________
~ James
Sockman
Don't Hurt Me
Don't Hurt Me


Joined: 19 Jun 2003
Last Visit: 24 Jun 2008

Topics: 3
Posts: 67
Location: City 17
usa.gif

PostPosted: Tue Mar 02, 2004 2:26 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

As soon as I saw the screenshots, I rushed to my coding computer and got ready to put this feature in. It's not too hard to get the text to appear on the screen, but actually having it stay on the screen for longer than .0005 seconds is a real challenge. I'm thinking a routine would be in order here.

Sample Code (untested, may not work):
::: CODE :::

void Message (char verb, char noun)
{
(Print Functions go here)
US_Print("You %s a %s.",verb,noun);
}


I define a verb and noun function to allow for multiple usages of this code.
We call to the code in another innovative way. Let's say you pickup a machinegun, and you want a msg to appear. Here is the code.

Message(got,Machinegun);

that will produce:

You got a Machinegun.

More uses:

Message(found,Secret Area); ---> You found a Secret Area.
Message(eat,Hotdog); ---> You eat a Hotdog.
Message(opened,door); ---> You opened a door.

I hope I've made this clear, but basically, you need to have a global function for making messages. Other instances could be created, but you can look into that yourselves.

If I figure this out, I'll let you know, of course.

_________________
This isn't revenge; it's punishment.
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Tue Mar 02, 2004 4:30 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

jamez wrote:
I've noticed that in End Of destiny screenshots it has text in the corner for secret areas...

I was just wondering if anyone can help me do this. I'm releasing something in a few weeks, and this would really help me...


It's not that hard... and it's already been released in a source... I'm not going to tell you which one... or where... but it's there... I'll let MCS handle that one... And yes, it's a feature that has been in EoD for some time...

Greg
BrotherTank
Hair Machine
DieHard SS
DieHard SS


Joined: 24 Nov 2003
Last Visit: 08 Jul 2017

Topics: 8
Posts: 431
Location: editing my profile
uk.gif

PostPosted: Wed Mar 03, 2004 12:00 pm
   Subject: Re: Floating Text
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Having it stay on the screen for long enough shouldn't be too hard. Just check out the code in WL_AGENT.C for the drawing of BJ's face when he gets the gatling gun... There's a function there that allows something to be put on the screen for the full amount of time it takes to play a sound. This should be more than adequate...
Not that I've tried it yet, this is all just theoretical.

_________________
Rar rar fiddle di dee
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Thu Mar 18, 2004 12:44 pm
   Subject: Re: [Help] Putting Floating Text (messages) on the Screen
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This function will print a string with a border. It's good to print bordered messages everywhere, and make the readable even if the background color is near to the foreground color.
Remember to include "stdarg.h" (I think is isn't included) to the top of "WL_DEF.H" (after the other #include).

::: CODE :::

// this will print a "fore" colored string with a "back" color border
void PrintBordered (word x, word y, byte fore, byte back, char *fmt)
{
   int   oldx = PrintX, oldy = PrintY, oldfont = fontnumber, m, n;
   char far   string[0x07FF];
   va_list   ap;

   if (fmt == NULL) return;
   va_start(ap, fmt); vsprintf(string, fmt, ap); va_end(ap);
   
   SETFONTCOLOR(back,0);
   for (m = 0; m < 3; m++) for (n = 0; n < 3; n++)
   {
      PrintX = x-1+m; PrintY = y-1+n; US_Print(str);
   }
   SETFONTCOLOR(fore,0);
   PrintX = x; PrintY = y; US_Print(str);
      
   PrintX = oldx; PrintY = oldy; fontnumber = oldfont;
}

WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Fri May 07, 2004 11:16 pm
   Subject: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ever wanted to have those annoying messages that pop up whenever you pick up an item, use something, etc? Well, now you can! This tutorial will make it so that you can display text messages on the screen which disappear after a few moments.

In WL_DEF.H, look for:

::: CODE :::

boolean      victoryflag;


Under that, add:

::: CODE :::

char         message[40];


This line defines the maximum amount of characters in the message, plus 1. I just used "40" as an example. Your messages cannot be any longer than 39 characters. If you need a longer message, change the "message[40]" to something higher.

Next, go down to where it says:

::: CODE :::

void  FarScalePost (void);


And add these two lines:

::: CODE :::

void   GetMessage (char *lastmessage);
void   DrawMessage (void);   


Now open WL_DRAW.C and look for:

::: CODE :::

long    lasttimecount;
long    frameon;


Beneath that, add this:

::: CODE :::

int   messagetime=0;   


Next, search for:

::: CODE :::

   DrawScaleds();         // draw scaled stuff
   DrawPlayerWeapon ();   // draw player's hands


Add these two lines:

::: CODE :::

if (messagetime > 0)
   DrawMessage ();


Now, at the very end of the file, insert this code:

::: CODE :::

/*
========================
=
= 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 ();
}


What I've done here is add two routines, "GetMessage" and "DrawMessage." "GetMessage" takes the text you want, and "DrawMessage" prints the text on the screen.

By using "GetMessage," you'll be able to put in-game messages where ever you want. To demonstrate this, open WL_AGENT.C and search for:

::: CODE :::

   case   bo_firstaid:
      if (gamestate.health == 100)
         return;

      SD_PlaySound (HEALTH2SND);
      HealSelf (25);
      break;


Add the line in red:

::: CODE :::

   case   bo_firstaid:
      if (gamestate.health == 100)
         return;

      SD_PlaySound (HEALTH2SND);
      HealSelf (25);
      GetMessage("Picked up a first aid kit.");
      break;


Every time you pick up the first aid kit, it should display this message for a few seconds. I'll leave it to you to add messages to the other items.

I hope this tutorial helps someone.

Keep wolfing,
WSJ.

EDIT: Added info about the character limit.
EDIT: Updated "DrawMessage" to prevent text printed over the border.
EDIT: Updated "DrawMessage" so the font size is set


Last edited by WSJ on Mon May 10, 2004 6:15 pm; edited 5 times in total
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: Sat May 08, 2004 3:05 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sounds interesting Wink
Is any screenshot available?
I once tried to create an intro with messageboxes explaining the point of a mod, but it didn't look that nice with those boxes Mr Green
Hmm, with a bit more time spend, this would have been much better... *doh*

Perhaps you should mention that you are not allowed to use messages with more than 39 characters. Otherwise the game may crash Wink
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Sat May 08, 2004 5:17 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yes, that's a good point. I've updated the tutorial.

A screenshot may follow at some point...
Guest




Last Visit:





PostPosted: Sat May 08, 2004 5:57 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Did you learn them from doom ?

sound like what I see them in doom 1 + 2 and others.. Wink
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

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

Yes, it's the same kind of thing as in Doom and other games. Smile

I got the idea for coding this feature after looking at Adam Biser's map name displayer and DarkOne's FPS counter.
Anonymous
Guest



Last Visit:





PostPosted: Sat May 08, 2004 11:55 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Great tutorial! Thanks! Corridor 7 has this ability as well and it would be useful for Wolf games. For instance if you try to get in a locked door, it could tell you what kind of key you need so you don't have to guess. (Of course, custom door slots would help there, too.)
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

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

WSJ, you are a genuis, nice tutorial, I gotta test this when I get the time! Yes! Smile

How would I add a switch to turn this one and off exactly, I kind of have an idea but I want to make sure.
And how would you say "You need a gold key to enter this" or Silver? Would it be like case dr_lock1: case dr_lock2...?

Thanks for the help in advance

_________________
Steam: http://steamcommunity.com/id/stormx312
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 04 Dec 2017

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Sun May 09, 2004 9:10 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is an excellent tutorial it is just like the floating text that End of Destiny. At the moment I'm trying to figure out how I can create a displayed timer as well.

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Sun May 09, 2004 1:51 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks guys! Smile

@KyleRTCW: For your first question, do you mean like an option to turn in-game messages on and off?

For locked doors, open WL_ACT1.C and look for this:

::: CODE :::

   lock = doorobjlist[door].lock;
   if (lock >= dr_lock1 && lock <= dr_lock4)
   {
      if ( ! (gamestate.keys & (1 << (lock-dr_lock1) ) ) )
      {
         SD_PlaySound (NOWAYSND);      // locked
         return;
      }
   }


Change it to this:

::: CODE :::

   lock = doorobjlist[door].lock;
   if (lock >= dr_lock1 && lock <= dr_lock4)
   {
      if ( ! (gamestate.keys & (1 << (lock-dr_lock1) ) ) )
      {
         SD_PlaySound (NOWAYSND);      // locked
         switch (lock)
         {
            case dr_lock1:
               GetMessage("You need the gold key to open this door.");
               break;
            case dr_lock2:
               GetMessage("You need the silver key to open this door.");
               break;
         }

         return;
      }
   }


If you had 4 keys in your game, you'd add cases for "dr_lock3" and "dr_lock4" as well.
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sun May 09, 2004 2:04 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah i meant on and off, I just want to make sure because I don't want to screw my code, I've worked too hard already.

Thanks for the locked door info.

_________________
Steam: http://steamcommunity.com/id/stormx312
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sun May 09, 2004 2:58 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Arggg, I tryed to do it myself and when I turn it back on, it won't show up at all, no text. hmmm, when I got to next level, it does though. Help me. Crying or Very sad

_________________
Steam: http://steamcommunity.com/id/stormx312
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Sun May 09, 2004 3:25 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I found a bug... Embarassed When you resize the view, some messages will print over the border. I've updated the tutorial for this. To those of you who already tried it, make sure you add this line in the "DrawMessage" routine:

::: CODE :::

void DrawMessage (void)
{
   messagetime-=tics;

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


@KyleRTCW: What was the code that you added? Could you post it here so I can look at it?
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Mon May 10, 2004 3:22 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Here's the code on how to turn these messages on & off, it works now to an update by Chris

This code might take up a little more memory and could be edited by using CenterWindow(); so keep that in mind.

Read the whole post
WL_DEF.H: First, Find "keys", it should look like this:
::: CODE :::

int                        ammo,
int                        keys,

Add below that:
::: CODE :::

int messageswitch;


WL_PLAY.C:
Put block of code below the MLI Cheat Code (you may not want to use Message, so you can use CenterWindow also I guess.)
::: CODE :::

   //
   // Message Toggle
   //

   if (Keyboard[sc_M])
   {
    if (gamestate.messageswitch == 1)
    {
      ClearMemory ();
      CA_CacheGrChunk (STARTFONT+1);
      ClearSplitVWB ();
      VW_ScreenToScreen (displayofs,bufferofs,80,160);

      Message ("In-Game Messages ON");
      VW_UpdateScreen ();
      gamestate.messageswitch = 0;
      UNCACHEGRCHUNK(STARTFONT+1);
      PM_CheckMainMem ();
      IN_ClearKeysDown();
      IN_Ack();
      return;
     }
     else if (gamestate.messageswitch != 1)
     {
      ClearMemory ();
      CA_CacheGrChunk (STARTFONT+1);
      ClearSplitVWB ();
      VW_ScreenToScreen (displayofs,bufferofs,80,160);

      Message ("In-Game Messages OFF");
      VW_UpdateScreen ();
      gamestate.messageswitch = 1;
      UNCACHEGRCHUNK(STARTFONT+1);
      PM_CheckMainMem ();
      IN_ClearKeysDown();
      IN_Ack();
      return;
     }
   }


Finally WL_DRAW.C
Add this in GetMessage:
Code wrote:

/*
==================
=
= GetMessage
=
==================
*/

void GetMessage (char *lastmessage)
{
if (!gamestate.messageswitch == 1)
{

messagetime = 150; // time to display
strcpy(gamestate.message, lastmessage);
}
else
{

// do nothing
}

}


And don't forget to add the "fontnumber 0;" in the DrawMessage as Chris mentioned Here it is if you didn't catch it:
Code wrote:

/*
================
=
= Draw Message
=
================
*/
void DrawMessage (void)
{
messagetime-=tics;

fontnumber = 0;
// font to use
SETFONTCOLOR (0xf,0x0); // color of message
PrintX=8; PrintY=2; // position on screen
US_Print(gamestate.message);
DrawAllPlayBorderSides ();
}

There complie and link up! You should be able to turn this on and off now. If you have bugs, read all the posts of this topic closely because this worked for me.

There, you can turn on and off the Messages!

_________________
Steam: http://steamcommunity.com/id/stormx312


Last edited by KyleRTCW on Tue May 11, 2004 3:42 am; edited 2 times in total
ZuljinRaynor
DieHard Officer
DieHard Officer


Joined: 17 Jan 2004
Last Visit: 30 Apr 2011

Topics: 19
Posts: 559
Location: New Jersey, USA
usa.gif

PostPosted: Mon May 10, 2004 12:49 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Another idea is to make it say "A wall moves" when you find it for if you do the space-bar trick, sometimes you can miss the wall that moved.
Guest




Last Visit:





PostPosted: Mon May 10, 2004 1:11 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

If you're talking about the secrets, just make the WSJ tutorial and open WL_ACT1.C. Do a search by "PushWall" and put the "GetMessage (anything here)" at the end of the routine.
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Mon May 10, 2004 3:22 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

OK, I don't think the problem is in the code that Kyle wrote... I think it has something to do with when those gray message boxes are displayed in WL_PLAY.C. The reason why I know is because I tried the "MLI" cheat and after it displays the cheat message, the same thing happens -- no more in-game messages.

Though I still don't know which line(s) of code is responsible for this. Any ideas??? Embarassed
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

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

PostPosted: Mon May 10, 2004 4:42 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

For your DrawMessage() routine, you have a font color, but you don't have a font size. The MLI cheat usually knocks the default font size up - and the graphics themselves for those letters get uncached afterwards (leaving that stuff directed to nothing). Maybe adding a line like "fontnumber=0;" above the color line would enforce it go back to the smaller size so it can stay visable without having to reload the graphics?

I haven't tested this out for your situation, just throwing out ideas. Good luck! Smile
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Mon May 10, 2004 6:19 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey, it worked! Very Happy Thanks Chris!

The tutorial's been updated. Make sure you have this line in "DrawMessage":

::: CODE :::

void DrawMessage (void)
{
   messagetime-=tics;

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


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Tue May 11, 2004 3:25 am
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It works with my switch too, just incase you wondering why I used Message (""); it's because CenterWindow's border's (tile8) are permentaly messed up, the only way I use them is with cheats.

Thanks Chris & WSJ! Very Happy

I've updated my post where I posted the switch code, which now works fully thanks to Chris, so If BrotherTank moves this to Code Tutorials, he can include that post because it has been tested and works.

_________________
Steam: http://steamcommunity.com/id/stormx312
Hair Machine
DieHard SS
DieHard SS


Joined: 24 Nov 2003
Last Visit: 08 Jul 2017

Topics: 8
Posts: 431
Location: editing my profile
uk.gif

PostPosted: Tue May 11, 2004 12:42 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This is a SUH-WEET tutorial. I was interested to see the code for the switching on/off of messages, as I did it a completely different way that used a lot less code. Maybe I should try Chris's version, as my way has one small bug... Well anyway, some nice stuff here.

_________________
Rar rar fiddle di dee
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

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

PostPosted: Tue May 11, 2004 1:01 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

KyleRTCW wrote:
I've updated my post where I posted the switch code, which now works fully thanks to Chris

Hair Machine wrote:
Maybe I should try Chris's version, as my way has one small bug...

What? Stop talking about me for no reason you fools! This nonsense is getting out of hand, 100% credit to WSJ please! Smile

WSJ's Tutorial! Thanks.
Hair Machine
DieHard SS
DieHard SS


Joined: 24 Nov 2003
Last Visit: 08 Jul 2017

Topics: 8
Posts: 431
Location: editing my profile
uk.gif

PostPosted: Tue May 11, 2004 2:10 pm
   Subject: Re: In-Game Messages Tutorial
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Of course, 100% credit to WSJ! But... didn't you write the switching messages on/off thing, Chris? Or am I just confused? HELP, MY BRAIN IS SIzzzzzzzzllleeee....

_________________
Rar rar fiddle di dee
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 1 of 4 Goto page 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