You can't make actual objects/object types, whatever you want to call them, but you can make TStaticVars, set variables, and join classes to them to do most of what you probably want to do.
PHP Code:
//#CLIENTSIDE
function onCreated() {
CheeseLocation = new TStaticVar();
CheeseLocation.join("CheeseLocation");
}
and in the class CheeseLocation:
PHP Code:
//#CLIENTSIDE
public function setPosition(x, y, z) {
this.position = {x, y, z};
}
public function getPosition() {
return this.position;
}
// you can even do this to spoof it as an object even further, but there's no real reason to
public function objectType() {
return "CheeseLocation";
}
Keep in mind there will be a delay between the time obj.join() is called and when the class is actually joined (it doesn't pause the script to wait for it to join).
You can also make new instances of the object you made.
PHP Code:
BigCheese = new CheesePosition();
BigCheese.setPosition(1, 3, 0);
SmallCheese = new CheesePosition();
SmallChese.setPosition(0, 4, 1);
A bit of a workaround but it works.
EDIT: oops, didn't notice the second page of the thread