Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1] 2   Go Down

Author Topic: Okay, so I just got Game Maker  (Read 3707 times)

0 Members and 1 Guest are viewing this topic.
Okay, so I just got Game Maker
« on: March 25, 2008, 09:36:08 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
I just re-downloaded Game Maker. Last time I had it, I never really did anything with it or learned how to use it properly.

Anyways, I'm a fast learner, and absorb information like a sponge, so I just want to know if you have any tips to shove me in the right direction, or any good commands you suggest I make use of.

I'm a real novice at this program, so any explanations you have will really help.

EDIT: I have a more specific question. I'm trying to make a Zelda-esque push-block system (minus being able to pull, since that would be too complicated for now), and it seems to be going well, but for some reason I'm having trouble figuring out how to make it so it stops moving once it has moved one space. I either get it to where I can push it, but it keeps going, or I can't push it.

Don't just give me a blatant answer on what to do, because I'd like to figure it out as independently as possible. I'm just wondering if you have a tip or 2.
« Last Edit: March 25, 2008, 09:42:13 pm by legendarylugi »
Logged

King Tetiro

Leader of Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #1 on: March 25, 2008, 09:41:12 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Well, firstly, go get advice from either of the following

-me. Im too busy right now. I'll be busy til May. Sad really
-mit. This guy rocks.
-atrius. Well, with mit, there's nothing that can go wrong
-king mob?. Well, he is the one with the best fan game here

err...anybody else?

Anyway, if not, might I suggest going to Game Maker Community? If I ever get stuck, I go there. I get my problems solved very quickly.
Logged
  • Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #2 on: March 25, 2008, 09:44:00 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
^^^Thanks for the list of good people to ask.  XD
Logged

King Tetiro

Leader of Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #3 on: March 25, 2008, 09:49:37 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Hey no problem! Glad to help!
Logged
  • Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #4 on: March 26, 2008, 12:25:17 pm »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
Make sure you also check the help file for an explanation of what each function does =)

Anyway, what you could do is i guess on the step event of the block...

Code: [Select]
if speed > 0 {
   if distance_to_object (link) > 10 { //just an example number, you'll have to play with the value to get it right
      action_move("000010000",0);
   }
}

This is assuming you're setting the blocks speed to a value to make it move, but give that a try.
« Last Edit: March 26, 2008, 12:28:56 pm by MG-Zero »
Logged



i love big weenies and i cannot lie

King Tetiro

Leader of Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #5 on: March 26, 2008, 01:06:25 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
I will be constructing a movement code for beginners. It's simple to use and it's effective
Logged
  • Phoenix Heart
Re: Okay, so I just got Game Maker
« Reply #6 on: March 27, 2008, 01:32:57 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Thanks, MG-Zero.  XD I have some questions regarding your advice: I checked the events, and there are 3 types of step events: Begin Step, Step, and End Step. Which are you saying I should use (I'm assuming Step)? And what do those 3 events DO?


So, anyways, I tried using that script, and got an error message. Basically it told me that variable "link" does not exist. And I guess that should be obvious, since I never created a variable called that. So here is my very noob question...how do I create a variable?  :P

Okay, that's the end of my questions regarding what you told me. The script mostly makes sense to me (it's basically spelled out, with a comment on the second line), I just don't get what the brackets after the inequality expressions do, or what the ones on the last 2 lines do.

EDIT: That would be sweet Laigonaz!
« Last Edit: March 27, 2008, 01:58:29 am by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #7 on: March 27, 2008, 01:58:24 am »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
Use step for what I gave you.  I'm really not sure what begin step and end step do.  As for your error, I used link as a substitute for the player, assuming you're making a zelda game.  Fill that in with the name of the object that you're letting the player control.
Logged



i love big weenies and i cannot lie
Re: Okay, so I just got Game Maker
« Reply #8 on: March 27, 2008, 02:00:37 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
EDIT: Nevermind, I get what you're saying.  XD
« Last Edit: March 27, 2008, 02:12:56 am by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #9 on: March 27, 2008, 02:04:00 am »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
oh it's not a variable.  Well, technically it is from a coding point of view, but just think of this specific one as an object.  Example, say you create an object called obj_player (the same way you created your block object).  Where I have link, you would put obj_player to get the distance to that object.

Also, GM doesnt require you to declare variables, you just type in a variable with some math or whatever and it's good to go.

edit: haha, ok i see you understand now XD
Logged



i love big weenies and i cannot lie
Re: Okay, so I just got Game Maker
« Reply #10 on: March 27, 2008, 02:17:44 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
^^^Thanks for all your help, man.  XD

EDIT: It's still not quite working how I want, but it's getting there.  XD
« Last Edit: March 27, 2008, 02:21:13 am by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #11 on: March 30, 2008, 03:24:46 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
For some strange reason, depth doesn't seem to be doing anything. I know what it's SUPPOSED to do, make it so ones with higher depths are drawn above those with lower depths, but it doesn't seem to be working.  :huh:
Logged
Re: Okay, so I just got Game Maker
« Reply #12 on: March 30, 2008, 03:41:26 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
oh it's not a variable.  Well, technically it is from a coding point of view, but just think of this specific one as an object.  Example, say you create an object called obj_player (the same way you created your block object).  Where I have link, you would put obj_player to get the distance to that object.

Also, GM doesnt require you to declare variables, you just type in a variable with some math or whatever and it's good to go.

edit: haha, ok i see you understand now XD
Well, it's a good idea to make an object that runs variable initialization code before anything else, because if you try to use maths with a variable that doesn't exist, it obviously won't work and you'll get an error.
And DON'T tick the "treat uninitialized variables as 0" box in the game settings. It makes it a whole lot harder to debug later.
In other words make an object at -50000 depth or something, put it in the room and in the create event:
Code: [Select]
global.lives = 3
global.playerx = 0
global.playery= 0
etc... Just be careful not to let this run more than once (I suggest making the object persistent too so it doesn't if you leave the room and come back), otherwise it will reset the variables to their initial states, ie the ones you set there.

For some strange reason, depth doesn't seem to be doing anything. I know what it's SUPPOSED to do, make it so ones with higher depths are drawn above those with lower depths, but it doesn't seem to be working.  :huh:
Well for starters, minus depth is higher than positive depth :P.
« Last Edit: March 30, 2008, 03:43:00 am by Darklight »
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: Okay, so I just got Game Maker
« Reply #13 on: March 30, 2008, 04:10:43 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Well for starters, minus depth is higher than positive depth :P.

Well that solves that problem.  XD I'll go test that out and see how it works.

EDIT: Yup, totally works now.  XD
« Last Edit: March 30, 2008, 04:17:36 am by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #14 on: April 03, 2008, 02:43:34 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Okay, so I'm back again, with more questions.

I'm trying to create a bomb flower engine.

Basically, the bomb is like a push block (I ended up not doing the pushblock the way you said), and when it is pushed away from the flower, that sets the alarm for it to go off. Once the alarm goes off, it turns into explosion_obj, and when the animation on explosion ends, the instance is destroyed.

Here's the problem. I can't find out how to make it so that when it moves away from the flower, it sets the alarm once (and only once). I knew it was going to be an issue. See, I tried doing it under the Step Event, saying that "if at relative position 0,0 there is NOT flower_obj, set Alarm 0 to X." The problem, of course, is that it keeps repeating that every step, setting the alarm over and over so it never goes off.

So, how can I keep it from repeating that action? Is there another event I should put it under, rather than step?


EDIT: Wait, I think I've found a solution!
EDIT2: Maybe not.  :-\
EDIT: Hooray!  XD

Sorry for bothering you.   :P
« Last Edit: April 03, 2008, 03:02:15 am by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #15 on: April 03, 2008, 05:36:55 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
I usually make variable switches for things like that in the step event, if that gives you any ideas.
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: Okay, so I just got Game Maker
« Reply #16 on: April 05, 2008, 07:29:50 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
EDIT: Nvmnd.

Sorry I keep jumping the gun with these questions.
« Last Edit: April 05, 2008, 07:35:58 pm by legendarylugi »
Logged
Re: Okay, so I just got Game Maker
« Reply #17 on: April 05, 2008, 09:58:53 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Okay, SERIOUSLY now.  XD

So, I'm trying to make it so that when one object (A) comes within a certain proximity of another object (B), B starts moving TOWARDS A.

Any help?

I tried using "Move towards," but I can't make the motion relative to the object it's moving towards. I can make it move relative, but relative to itself, which doesn't do me any good.
Logged

Giverny

Christ on Acid
Re: Okay, so I just got Game Maker
« Reply #18 on: April 06, 2008, 12:14:27 am »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
MG-Zero, doesnt GM require you to declare variables by mentioning them in the create function?
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums
Re: Okay, so I just got Game Maker
« Reply #19 on: April 06, 2008, 12:38:03 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
MG-Zero, doesnt GM require you to declare variables by mentioning them in the create function?
only if you do not tick "treat uninitialized variables as 0".
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Pages: [1] 2   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.023 seconds with 73 queries.