Legacy GM A Question that I can't Explain precisely...

C

ConsolCWBY

Guest
@Heat4Life : I gotta ask this question. I looked at your twitter. What is your programming experience? Do you mod minecraft?
I'm not going to make anyone happy here, but have you considered using Drag and Drop instead of code to get used to Gamemaker? I really think pure code may be beyond your current capabilities. BUT- everyone has to start somewhere. :)
And I must say, everyone in this thread, including you, are extraordinarily patient! I'm very impressed!
 
H

Heat4Life

Guest
@Heat4Life : I gotta ask this question. I looked at your twitter. What is your programming experience? Do you mod minecraft?
I'm not going to make anyone happy here, but have you considered using Drag and Drop instead of code to get used to Gamemaker? I really think pure code may be beyond your current capabilities. BUT- everyone has to start somewhere. :)
And I must say, everyone in this thread, including you, are extraordinarily patient! I'm very impressed!
Lol I ain't a Minecraft Mod creator... I'm a Java Programmer trying to learn GML for faster Video Game Development lmfao
 

jo-thijs

Member
That kind of helps, that you already know some java.

There are some differences with variables in java and in GameMaker.
In java, you can create classes. In GameMaker, those would be objects.
In java, you can create objects of certain classes. In GameMaker, those would instances of certain objects.

In java, you can give classes certain members, which are variables you can access later.
Every object you create in java of the same class will always have the exact same members (with different values).

In GameMaker those members would be instance variables.
However, instance variables can be added on the fly.
This causes several instances of the same object to be able to have different instance variables.
You can create new instance variables by just simply assigning the variable a value.

Now, what this code:
Code:
var o;
o = instance_create(x, y, obj_deadplayer);
o.angle = bla bla bla
would be in java, is:
Code:
obj_deadplayer o = new obj_deadplayer(this.x, this.y);
o.angle = bla bla bla;
The only thing is, in GameMaker, the variable angle doesn't have to exist yet in the instance o,
if it doesn't exist, it is just created inside that instance.

I hope that helps!
 
H

Heat4Life

Guest
That kind of helps, that you already know some java.

There are some differences with variables in java and in GameMaker.
In java, you can create classes. In GameMaker, those would be objects.
In java, you can create objects of certain classes. In GameMaker, those would instances of certain objects.

In java, you can give classes certain members, which are variables you can access later.
Every object you create in java of the same class will always have the exact same members (with different values).

In GameMaker those members would be instance variables.
However, instance variables can be added on the fly.
This causes several instances of the same object to be able to have different instance variables.
You can create new instance variables by just simply assigning the variable a value.

Now, what this code:
Code:
var o;
o = instance_create(x, y, obj_deadplayer);
o.angle = bla bla bla
would be in java, is:
Code:
obj_deadplayer o = new obj_deadplayer(this.x, this.y);
o.angle = bla bla bla;
The only thing is, in GameMaker, the variable angle doesn't have to exist yet in the instance o,
if it doesn't exist, it is just created inside that instance.

I hope that helps!
Ohh... Well that makes thing more simpler actually... Wow lol...
 
Top