Adding precipitation event
by Dameeuhn · in Torque 3D Beginner · 01/01/2014 (4:03 am) · 1 replies
This was the code I could come up with,
I based the code on this,
I wanted to add a precipitation object into the mission on collision with object however the code doesn't seem to work and I'm kinda lost on how to work with it.
function object::onCollision(%this, %obj, %col)
{
%newEn = new Item() {
datablock = Sandstorm;
};
missionCleanup.add(%newEn);
%newLogo.setTransform("25 -400 10 1 0 0 0");
echo("Inserting Shape " @ %newLogo);
return %newEn;
}I based the code on this,
function createLogo()
{
%newLogo = new Item() {
datablock = TorqueLogo;
};
missionCleanup.add(%newLogo);
// Object setup
%newLogo.setTransform("25 -400 10 1 0 0 0");
echo("Inserting Shape " @ %newLogo);
return %newLogo;
}I wanted to add a precipitation object into the mission on collision with object however the code doesn't seem to work and I'm kinda lost on how to work with it.
Employee Michael Perry
ZombieShortbus