Making machines in GM?

Posted by Hvatnajokl on March 13, 2007, 4:15 p.m.

Hi,

Sometimes im thrilled by the thought of creating a lifelike machine in gamemaker, like for example an ATM machine och a vending machine. The programming can be as simple or as complicated as you wish. With a simple machine such a simulation could be quite close to the real deal. Has anyone seen anything like this done in gamemaker?

With a nice gui it would be awesome to use such a machine in a game, in fact if you incapsulate all the code and scripts you could create a hall o machines made by different people.

Anyone interested in takin this further?

Comments

NoodleNog 17 years, 1 month ago

On mouse pressed event:

instance_create(x,y,obj_cola)
?

Hvatnajokl 17 years, 1 month ago

There you go!

Or for an elevator…

swich(button)

{

case 2: soundplay(elevatormusic.mid) alarm[0]=300

alarm[0] message("Welcome to accounting!")

NoodleNog 17 years, 1 month ago

Quote:
There you go!

Or for an elevator…

swich(button)

{

case 2: soundplay(elevatormusic.mid) alarm[0]=300

alarm[0] message("Welcome to accounting!")

Umm.. you mean

switch(button)
{
case 2: sound_play(elevatormusic); alarm[0]=300; break;
}

and alarm0:

show_message("Welcome to accounting!")

Geez get the sytax right.

Kaz 17 years, 1 month ago

instance_create(x,y,objUniverse)

I win.

Hvatnajokl 17 years, 1 month ago

I got some code for you to quote.

sleep(100000000000000000000);

melee-master 17 years, 1 month ago

I believe that GM does not support numbers that large. =P

Rob 17 years, 1 month ago

D:

noshenim 17 years, 1 month ago

Once I made a block in gm.

DevonX 17 years, 1 month ago

Damn that's some hard core stuff.

mazimadu 17 years, 1 month ago

In RPGs they do it all the time.