Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Game Maker
#1
Has anyone here used Game Maker? I suck with GML, as I have absolutely no coding background, and it'd be cool if someone here had made a game with it before and could help me. Smile I used to post on their official forums, but that got me nowhere.

Also, I'd like to recommend it to people who would like to make games. Smile It's easy to use if you keep things simple, and they even have an option for people who don't know how or do not want to code, so you can make games with drag&drop.
[url=javascript:void(0);][Image: lostodd2.png?t=1230460315][/url]
Reply
#2
I did mess around with it a few years ago, but haven't really came up with anything spectacular. Ask away I would say, I know some php so who knows if we can help you with your problems.
Reply
#3
Okay. Smile

Code:
[B][SIZE=2]if[/SIZE][/B][SIZE=2] selected=[/SIZE][SIZE=2][COLOR=#800000]true[/COLOR][/SIZE][SIZE=2]&&[/SIZE][SIZE=2][COLOR=#000080]place_meeting[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]x[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff]y[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#800080]obj_inv_box[/COLOR][/SIZE][SIZE=2])&&![/SIZE][SIZE=2][COLOR=#000080]place_meeting[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]x[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff]y[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#800080]obj_invwindow[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2][B]{[/B][/SIZE][SIZE=2][COLOR=#000080]move_snap[/COLOR][/SIZE][SIZE=2](25,25)[/SIZE]
[SIZE=2]selected=[/SIZE][SIZE=2][COLOR=#800000]false[/COLOR][/SIZE]
[B][SIZE=2]global[/SIZE][/B][SIZE=2].pick=[/SIZE][SIZE=2][COLOR=#800000]false[/COLOR][/SIZE]
[SIZE=2]stored=[/SIZE][SIZE=2][COLOR=#800000]true[/COLOR][/SIZE]
[SIZE=2][B]exit}[/B][/SIZE]

That's my inventory currently. obj_invwindow is my inventory window, obviously, and obj_inv_box is the area in which my items are stored, I made it a seperate object than the rest of my inventory window because, obviously, I can't have people dumping their items anywhere on the window. move_snap means that it's sectioned into 25x25px boxes that the items "snap" into when you click them into it.

For you to be able to place items into your inventory right now, you have to click them, press "i" to open your inventory window, and then place them there. That's also how my equipment is supposed to work, I'm still working on it.. It's creating more move_snap boxes than I want and they're not centered on the area where I want equipment to go.

I want to be able to click items on the ground that are close to me and have them automatically store themselves in my inventory window whether or not it's visible at the time, and they have to go somewhere other items aren't, or else a window pops up saying my inventory is full. The wondow part I can take care of.

This is how I have it so that I can only pick up items close to me.

Code:
[SIZE=2][SIZE=2][B]if[/B] selected=[/SIZE][SIZE=2][COLOR=#800000]false[/COLOR][/SIZE][SIZE=2]&&[/SIZE][SIZE=2][COLOR=#000080]point_distance[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]x[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#0000ff]y[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#800080]obj_player[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000ff]x[/COLOR][/SIZE][SIZE=2],[/SIZE][SIZE=2][COLOR=#800080]obj_player[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#0000ff]y[/COLOR][/SIZE][SIZE=2])<=100[/SIZE][/SIZE]
[SIZE=2][SIZE=2][B]{[/B]selected=[/SIZE][SIZE=2][COLOR=#800000]true[/COLOR][/SIZE]
[SIZE=2][B]exit}[/B][/SIZE]
[/SIZE]


[SIZE=2]The "selected" variable is defines in my parent object for all items, it's so that the items know that they're picked up and need to follow the mouse accordingly.


The "global.pick" global variable is so that my character knows items are selected by the mouse and he cannot move until they are released.

"stored" of course is whether or not they're stored in my inventory, and "equipped" is whether or not they're equipped. Their stats only apply to my character if equipped=true.
[/SIZE]
[url=javascript:void(0);][Image: lostodd2.png?t=1230460315][/url]
Reply
#4
If you want your items to automatically store like in diablo if you don't have the inventory opened, you simply need a global variable that switched between 0 and 1 when you open/close your inventory.

You global variable would for example be "hud_invopen"
apparently the whole 'selected' thing is a script that is in the game maker?
If you want the items to go straight into the inventory this is a step you want to skip; better take a look at the script that stores your items in the inventory.
Some steps the script will have to follow:
0) Check what script to run; hud_invopen=true -> The selected=true script, if hud_invopen=true -> The stored=true script
1) Check if there is place in the inventory (doing this first saves a silly bit of CPU load) and where
2) Check if the item is close enough to the player
3) On click, it should skip the 'selected=true' part and go straight for the inventory (I think this is stored=true? Can the player choose where he stores his items or does the game decide over this?)
4) Some debugging could go here


I'm just logically thinking here, but those scripts seem really really small to me Big Grin I suppose most scripting is done already by 'game maker'?
Reply
#5
I made all of the variables.. And with move_snap, I don't know how to make it check if the space is empty, that's why right now I have it so you pick up the item, open your inventory, an dplace it in what spot you want it.
[url=javascript:void(0);][Image: lostodd2.png?t=1230460315][/url]
Reply
#6
Well, it's perhaps easiest to check which spaces are not empty, and then put the item in the next space that is 'not not empty' :p
depends a bit on how it stores the items in the memory, you'll need to find the inventory script and take a good look at it and how it manages inventory space.
Reply
#7
It's overly simple, which is my problem.

"move_snap(25,25)" makes 25x25 boxes into which items "snap". That's all there is to it.. I have another simple script that replaces the one I'm holding with the one in my inventory, and that's basically how the whole thing works right now. I might be able to move it and check for a collision, but I'd have to have the inventory window pop up for a split second while it moves it into it, because if it's not visible, the items won't snap into place.. If there was a way to overcome that, I'd be a very happy person.
[url=javascript:void(0);][Image: lostodd2.png?t=1230460315][/url]
Reply
#8
Well if you made the move_snap script yourself then you know how to overcome it, so I suppose you haven't made it yourself.
You need to look in that script and check how items in the inventory are stored and how their position is stored.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Zerg Rush Game on Google jedimaster86 0 419 04-29-2012, 05:46 AM
Last Post: jedimaster86
  I need a no-cd crack for WC3 TFT I got the game installed but no cds Joshy 0 173 03-17-2007, 11:07 AM
Last Post: Joshy
  Any Programmers out there that can make hacks for a game?? UserNova 3 232 07-21-2006, 07:24 AM
Last Post: skidude
  Game Crashes rye347 9 246 03-13-2006, 11:44 AM
Last Post: PvP-Fvcker
  Game does not start ShinobiRAGE 4 289 09-18-2005, 01:49 AM
Last Post: ShinobiRAGE
  Qbasic game 4sylum 7 349 01-02-2005, 07:31 AM
Last Post: Karant
  Will a mod chip enable play jap game? Dynafrom 2 215 01-01-2005, 01:50 PM
Last Post: Karant

Forum Jump:


Users browsing this thread: 1 Guest(s)