Game Development Community

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,
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.

About the author

Recent Threads

  • Healthbar manipulation

  • #1
    01/01/2014 (9:05 am)
    You are trying to create the wrong object. Check out the docs.