Hamumu Forum

Hamumu Forum (http://hamumu.com/forum/index.php)
-   Making Dumb Games (http://hamumu.com/forum/forumdisplay.php?f=38)
-   -   Messages in GM6? (http://hamumu.com/forum/showthread.php?t=10461)

chaucer 07-23-2006 05:06 PM

Messages in GM6?
 
How do I make it so that if the player bumps an object, it shows a little rectangle with some information on it?

pizza 07-24-2006 12:09 AM

To make the other object show the message:

In the Create event of that little object:
Code:

{
message=0
}

In the collision:
Code:

{
message=1
alarm[9]=10 //How long it shows the message
}

In the alarm[9]:
Code:

{
message=0
}

In the draw event:
Code:

{
if(message==1){
 draw_rectangle(x,y-30,x+32,y-10,true)
 draw_text(x+5,y-20,"Hello")
  //You know how to draw these things, right?
 }
}


chaucer 07-24-2006 06:30 AM

Is that even possible in unregistered?

AtkinsSJ 07-24-2006 10:06 AM

Yeah.
For code actions, click on the Control tab, then the first icon under 'Code' is the code icon. Drag it in, and it'll open on its own.

chaucer 07-24-2006 12:34 PM

Quote:

Originally Posted by pizza
To make the other object show the message:

In the Create event of that little object:
Code:

{
message=0
}

In the collision:
Code:

{
message=1
alarm[9]=10 //How long it shows the message
}

In the alarm[9]:
Code:

{
message=0
}

In the draw event:
Code:

{
if(message==1){
 draw_rectangle(x,y-30,x+32,y-10,true)
 draw_text(x+5,y-20,"Hello")
  //You know how to draw these things, right?
 }
}


Is all of that done in an "execute a piece of code" action?

AtkinsSJ 07-26-2006 11:10 AM

Yeah. Each seperate bit is in an 'execute code' action, in the event Pizza says.

AmazinX 08-04-2006 07:41 AM

Quote:

Originally Posted by pizza
To make the other object show the message:

In the Create event of that little object:
Code:

{
message=0
}

In the collision:
Code:

{
message=1
alarm[9]=10 //How long it shows the message
}

In the alarm[9]:
Code:

{
message=0
}

In the draw event:
Code:

{
if(message==1){
 draw_rectangle(x,y-30,x+32,y-10,true)
 draw_text(x+5,y-20,"Hello")
  //You know how to draw these things, right?
 }
}


Or:

Code:

<---->

Show message:

<---->



All times are GMT -7. The time now is 10:49 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.