Author Topic: New Static Object Thing [Solved by Port]  (Read 1544 times)

How do I make a new static object thing with my own model that can be created like this?
Code: [Select]
%this = new StaticShape()
{
rotation = "1 0 0 90";
scale = "0.6 5 0.6";
position = 0 0 0;
canSetIFLs = "0";
datablock = "Whatever";
indestructable = true;
};
« Last Edit: July 03, 2012, 08:23:43 PM by jes00 »

First of all you need to create the datablock for the shape and set its shapeFile to your model. Then use your above code to actually create the object.

First of all you need to create the datablock for the shape and set its shapeFile to your model. Then use your above code to actually create the object.
What I'm wanting to know is what class to create the datablock under.

What I'm wanting to know is what class to create the datablock under.

staticShapeData.


To detect when it's hit with a projectile do I just do function staticShapeData::onProjectileHit? If so what are the vars for it?

To detect when it's hit with a projectile do I just do function staticShapeData::onProjectileHit? If so what are the vars for it?
It's better to do yourDB::onProjectileHit

It's better to do yourDB::onProjectileHit
Not in my case. It will check for a certain property in the static object and I don't wanna make a new function for each static object.

Not in my case. It will check for a certain property in the static object and I don't wanna make a new function for each static object.
Kalphiter is correct I believe.

Umm. How do I give it collision?

Umm. How do I give it collision?

That's something you do in the DTS model.

That's something you do in the DTS model.
*facepalm*

*facepalm*
Don't be dumb. This is coding help, not model help

Don't be dumb. This is coding help, not model help
What do you mean? I don't even know how to model and I did not face palm because he didn't say how to do it in modeling.