Game Maker Questions Topic!!!

Need programming help? Want to post programming tips? Are you programming a game and want to show it off? That and more here.

Game Maker Questions Topic!!!

Postby agentms11 » February 22nd, 2010, 4:44 pm

Hey, I've recently been helping a couple of people with their questions on Game Maker.
So I decided to make a topic.
Anyone with a question can ask here, and will be answered by MEEEEEE!!!!
Or by anyone else who knows the answer and ninjas me.
In other word, If you know the answer to someone else's question, you can answer.
Bear in mind, I'm not guaranteeing I'll be able to answer.
I'll try my best.

Here are some things I helped with so far:
TheBetterGamer wrote:I don't know how to make something light up when the mouse touches it.

Make 2 subimages (one dark and one light). In the "Create" event:
Code: Select all
image_index = 0; //this is which subimage it is showing (subimage 0 is the darker one.).
Image_speed = 0; //this is what speed the animation is playing at (in this case, 0, so it doesnt play.)

In the "Mouse Enter" event:
Code: Select all
image_index = 1; //It should show the lighter one.)
image_speed = 0;

In the "Mouse Leave" event:
Code: Select all
image_index = 0; //back to the darker subimage
image_speed = 0;

If you want to do this in D&D (Drag and Drop):In "Control", on bottom where is says "Variables", use the first D&D action ("Set Variable" (a gray square that says "VAR")).
TheBetterGamer wrote:I don't know how to make a "yes/no" message pop-up.
In the event that you want the message to pop up
Code: Select all
question = show_question( "Do you want to do something?" );
if question = 1
{
do something;
}

If you want to do this in D&D: In "Control", on top where is says "Questions", use the sixth D&D action ("Check Question" (a blue octagon that has a speech bubble with a question mark in it(put the actions that you want to happen if the player hits yes after it)).
TheBetterGamer wrote:I don't know how to make you restart the game when a block touches the mouse.
I had an object "mouse". In that object, in the step event
Code: Select all
x = mouse_x;
y = mouse_y;

If you want to do this in D&D: In "Move", in the middle where is says "Jump", use the first D&D action (Jump to position (a gray square that has 2 X's with an arrow pointing from one to the other)).
That is how to replace the mouse by the way (and in "Global Game Settings" make sure that the option "Display the cursor" is not checked).
Then in the collision event with an enemy
Code: Select all
room_restart();

If you want to do this in D&D: In "Main2", near the bottom where is says "Main", use the first D&D action ("Restart Game" (a gray square that has 2 arrows in a circle pointing at each other))
Its that simple...
Zunar wrote:how do you make it where a message will appear and it will have different options on it and it does different things depending on which option you selec
Code: Select all
message = show_message_ext( "What do you want to say?" , "Hi" , "Hello" , "Bye");
if message = 1
{
Do something;
}
else if message = 2
{
Do another something;
}
else if message = 3
{
Do something different;
}


EXPLANATION!!!

message = show message_ext( "What do you want to say?" , "Hi" , "Hello" , "Bye")

"message" is the variable. "show_message_ext" is the function.
""What do you want to say?"" is what the message box will show (the question).
""Hi"" is what the first button will say. ""Hello"" is what the second button will say. ""Bye"" is what the third button will say.
---
if message = 1
{
Do something;
}

If the variable "message" is equal to one (i.e. you chose the first button), then do something.
---
if message = 2
{
Do another something;
}

If the variable "message" is equal to two (i.e. you chose the second button), then do another something.
---
if message = 3
{
Do something different;
}

If the variable "message" is equal to three (i.e. you chose the first button), then do something different.
---

Oh, change the "Do something" with what you want to happen if the player hits that button.

tl;dr version: I helped with a few things.

I hope this topic lives...
(I doubt it though. I never havee good luck with topics)
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

BANANASPLIT (aka. will be merged in some secs)

Postby Zed98 » March 11th, 2010, 4:38 pm

Ok...
Questions:

I'm trying to figure out how to make the missles home-in on Super Sonic.
Zed98

Well, I don't appear too often, but I'm still alive!
User avatar
Zed98
The Legacy

 
Posts: 744
Joined: September 22nd, 2009, 1:17 pm
Location: Somewhere in the United States of American

Thumbs Up given: 11 times
Thumbs Up received: 4 times

Re: Sonic & Knuckles Doomsday Zone Engine

Postby agentms11 » March 11th, 2010, 4:55 pm

I'm assuming you want it in D&D:
Just put this in the step event.
Image
(On the first page ("move") on bottom)
x: sonic.x
y: sonic.y
speed: 5
stop at: solid only

Replace "sonic" with the object you want it to home in on.

Hope this helps!!!!!
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Re: Game Maker Questions Topic!!!

Postby Zunar » March 11th, 2010, 6:41 pm

How do you create sprite and object folders?
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Re: Sonic & Knuckles Doomsday Zone Engine

Postby Zed98 » March 12th, 2010, 4:45 am

I keep getting this:

Code: Select all
___________________________________________
ERROR in
action number 1
of  Step Event
for object Missle:

Error in expression:supersonic.x
 position 1: Unknown variable supersonic
Zed98

Well, I don't appear too often, but I'm still alive!
User avatar
Zed98
The Legacy

 
Posts: 744
Joined: September 22nd, 2009, 1:17 pm
Location: Somewhere in the United States of American

Thumbs Up given: 11 times
Thumbs Up received: 4 times

Re: Sonic & Knuckles Doomsday Zone Engine

Postby Suyo » March 12th, 2010, 7:10 am

How is the object called? Is it supersonic?
Image

Image

Image

Image

Image

Image
User avatar
Suyo
"quite easily the most manly man of all" --Raz

Error contacting Twitter
Error contacting last.fm
 
Posts: 2771
Joined: July 28th, 2009, 2:41 am
Location: Nuremberg (Germany)

Runouw Votes Winner
For winning the RV New Year 2012 Award for Best Moderator. Like you didn't know. XD

Thumbs Up given: 26 times
Thumbs Up received: 359 times

Re: Sonic & Knuckles Doomsday Zone Engine

Postby Zed98 » March 12th, 2010, 10:11 am

Name: Super Sonic
Zed98

Well, I don't appear too often, but I'm still alive!
User avatar
Zed98
The Legacy

 
Posts: 744
Joined: September 22nd, 2009, 1:17 pm
Location: Somewhere in the United States of American

Thumbs Up given: 11 times
Thumbs Up received: 4 times

Re: Sonic & Knuckles Doomsday Zone Engine

Postby agentms11 » March 12th, 2010, 1:34 pm

Zunar wrote:How do you create sprite and object folders?


Right click > Create Group
OR
<Shift> + <Insert>

Zed98 wrote:Name: Super Sonic


Don't put spaces in names.
Use "_" instead.
And it's case sensitive.
So if your object is called Super_Sonic you would have to do Super_Sonic.x
Hope this helps!!!!!
BROCCOLI TASTES LIKE CHICKEN!
YEAH!


NOW FOR... ARTEMIS FOWL!!!!
ImageImageImageImageImage
User avatar
agentms11
As Ninja As Myst

 
Posts: 138
Joined: August 1st, 2009, 5:13 pm

Thumbs Up given: 0 times
Thumbs Up received: 0 times

Back to: Game Maker Questions Topic!!!

Postby Zed98 » March 12th, 2010, 3:49 pm

I now get this:

Code: Select all
___________________________________________
ERROR in
action number 1
of  Step Event
for object Missle:

Error in expression:Super_Sonic.x
 position 13: Unknown variable x

___________________________________________
ERROR in
action number 1
of  Step Event
for object Missle:

Error in expression:Super_Sonic.y
 position 13: Unknown variable y
Last edited by Zed98 on March 14th, 2010, 4:23 am, edited 1 time in total.
Zed98

Well, I don't appear too often, but I'm still alive!
User avatar
Zed98
The Legacy

 
Posts: 744
Joined: September 22nd, 2009, 1:17 pm
Location: Somewhere in the United States of American

Thumbs Up given: 11 times
Thumbs Up received: 4 times

Re: Game Maker Questions Topic!!!

Postby Zunar » March 12th, 2010, 9:18 pm

agentms11 wrote:Right click > Create Group
OR
<Shift> + <Insert>


Thank you!
User avatar
Zunar
Honorary Member

 
Posts: 1838
Joined: August 1st, 2009, 4:50 pm
Location: In the shadows, where you'll never find me.

Thumbs Up given: 14 times
Thumbs Up received: 51 times

Next

Return to Programming