Author Topic: Classes  (Read 810 times)

Is making your own via script possible in Torque?

...

If you think about it, TDM is sorta like classes. Team 1 is a class, and Team 2 is a class. They can all have their seperate playertypes, weapons and tools.
« Last Edit: November 01, 2009, 10:08:34 PM by Deriboy »

School classes?
Classes like sniper or infantry? (I think you mean this)
What?
Quote
Coding Help
Stay out if you don't know what you're talking about.

new ScriptObject(BlahObject)
{
        class = BlahClass;
};
function BlahClass::doStuff(%self)
{
}
You can't make "engine" driven classes (Script Object, fxDtsBrickData, etc) but you can make "script" driven classes.

Awwww
Basically what I wanted was inheritance.

Stay out if you don't know what you're talking about.

I do. I just was forcing you to be more clear.

School classes?
Classes like sniper or infantry? (I think you mean this)
What?
Say, lets all talk about subjects that we've no valid information about.

I do. I just was forcing you to be more clear.
If you were a scripter you'd understand what he meant right off the bat. forget off of coding help if you can't provide any valid coding help.

Stay out if you don't know what you're talking about.
If you were a scripter you'd understand what he meant right off the bat. forget off of coding help if you can't provide any valid coding help.
Two totally different reactions here.

Two totally different reactions here.
Right, since it's already been said we should never say it again. In fact, I'm fairly sure every word I'm using has been said before. Maybe we should all just cut out our vocal cords. After all, a lesson learned should never be spoken of again. A penny saved is the only penny you should ever have. Nothing could possibly gain additional meaning if it comes from more than one source. I'm sure every single person agrees that Kalphiter is a 100% trusted source of information, so my saying of the same thing holds no value whatsoever. Which brings me to my next point: critics; we have too many of them. We as a society should strive to eliminate through any means necessary the repetition of ideas, starting with English majors and ending with lawyers. We also need to eliminate the excess use of quotes and alliteration. On top of that, we should compare by reaction instead of wording. If person A makes a statement, and person B creates a reasoning for person A's statement while repeating it, person B should be taken outside and shot with point-hollow 44s in the alleyway. This would clean up the internet and most courts of law considerably.

Say, let's complicate coding help guideline reiteration.

Rky, we should totally do that this weekend. Mass Cleansing.

Awwww
Basically what I wanted was inheritance.
You could start every function with "ParentClass::doStuff(%self);" which would kind of work. Rotondo made a set of RotZombieDefault::onCollision etc. functions which he then put into every zombie type to make them work.

Code: [Select]
function ZombieDefault::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
   //Your code
}

function RotNormalZombie::onCollision(%this, %obj, %col, %fade, %pos, %norm)
{
   //your code
   ZombieDefault::onCollision(%this, %obj, %col, %fade, %pos, %norm); //Inherited script class's code
   parent::oncollision(%this, %obj, %col, %fade, %pos, %norm); //Inherited Player, AIPlayer class's code
}
« Last Edit: October 25, 2009, 01:10:48 PM by Space Guy »

Oh, I guess you mean classes like a static object class and stuff, and I had my class system all copied and was gonna post it. :/ Good thing I stopped myself.

Oh, I guess you mean classes like a static object class and stuff, and I had my class system all copied and was gonna post it. :/ Good thing I stopped myself.

If you were a scripter you'd understand what he meant right off the bat.

Is there a way to list all of the classes in the console? and/or All of the objects of a certain class?

dumpConsoleClasses();
Note that every datablock and GUI object with special functions (e.g. "gunImage::onFire") counts as a class.