Spawn a mounted object
by Niklas Karlzén · in Torque Game Engine · 02/04/2010 (5:00 pm) · 1 replies
How can I make a mounted object spawn, at the same time as the object it´s mounted too spawns? So if i have an object that moves from right to left, in a sine-wave movement, which spawns on collision with the left world limit. How do i make an other object mounted to that one, actually spawn, instead of sliding back across the screen?
( Im very new to programming, as you probably already have guessed by now, hehe =P )
( Im very new to programming, as you probably already have guessed by now, hehe =P )
Michael Ruben Lugo
[code]
function MyPlayerClass::onAdd(%this) // The args might have to be %this, %obj in some cases
{
%sword = new ShapeBaseImage() //The object being created
{
datablock = SweetSword;
};
%this.mountImage(%sword,0); //Would be different if the object was not an image
}
[code]
[quote]
So if i have an object that moves from right to left, in a sine-wave movement, which spawns on collision with the left world limit. How do i make an other object mounted to that one, actually spawn, instead of sliding back across the screen?
[quote]
I did not truly understand what you were trying to say.