View Single Post
  #6  
Old 08-07-2011, 01:32 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
If you're new to GScript I would strongly recommend that you ignore Crow's post until you're more experienced. In GScript, a very small percentage of your code actually involves creating objects like that (I've only done it a few times in 5+ years).

Be careful not to confuse Graal 'classes' with Java's. Classes in Graal are kind of unique—you can 'join' a class to an object, such as a player or NPC, and the code of that class is essentially copied and pasted into that object's script. You can join as many classes as you want to an object.

Unlike Java, Graal has no way to create your own object types except through hackish methods like what Crow described. Most of your code will go in weapon scripts and classes.

This post (ignore my old, terrible styling) may help a bit in understanding classes in GScript.

If you know JavaScript, I would try comparing Gscript to that rather than Java.
__________________
Reply With Quote