Problems mounting an emitter
by Toks · in Torque Game Engine · 08/09/2007 (7:25 am) · 1 replies
Hey everyone.
ive got this image i use to shoot particles from a player:
datablock ShapeBaseImageData(HexTargetImage)
{
shapeFile = "~/data/shapes/weapon/model.dts";
emap = true;
mountPoint = 1;
eyeOffset = "0 0 0";
correctMuzzleVector = false;
// namespace as parent
className = "TargetImage";
// Initial start up state
stateName[0] = "Preactivate";
stateEmitter[0] = HexEmitter;
stateEmitterTime[0] = 0.5;
stateEmitterNode[0] = "muzzlePoint";
};
when my projectile collides with a player, i mount this as following:
%col.mountImage(HexTargetImage, 1);
the first time this works correctly and a cloud of particles are shot from the player.
when i want this to be applied a second time simply nothing happens.
i tried unmounting the image first, but that doesnt seem to help. what would cause this?
ive got this image i use to shoot particles from a player:
datablock ShapeBaseImageData(HexTargetImage)
{
shapeFile = "~/data/shapes/weapon/model.dts";
emap = true;
mountPoint = 1;
eyeOffset = "0 0 0";
correctMuzzleVector = false;
// namespace as parent
className = "TargetImage";
// Initial start up state
stateName[0] = "Preactivate";
stateEmitter[0] = HexEmitter;
stateEmitterTime[0] = 0.5;
stateEmitterNode[0] = "muzzlePoint";
};
when my projectile collides with a player, i mount this as following:
%col.mountImage(HexTargetImage, 1);
the first time this works correctly and a cloud of particles are shot from the player.
when i want this to be applied a second time simply nothing happens.
i tried unmounting the image first, but that doesnt seem to help. what would cause this?
Torque Owner Toks
if you want to copy this sure do:
datablock ShapeBaseImageData(HexTargetImage)
{
// Basic Item properties
shapeFile = "~/data/shapes/weapon/model.dts";
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 1;
eyeOffset = "0 0 0";
correctMuzzleVector = false;
// namespace as parent
className = "TargetImage";
// state machine
stateName[0] = "Preactivate";
stateEmitter[0] = HexEmitter;
stateEmitterTime[0] = 0.5;
stateEmitterNode[0] = "muzzlePoint";
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "End";
stateName[1] = "End";
stateScript[1] = "clearDamageEmitter";
};
function HexTargetImage::clearDamageEmitter(%this, %obj, %slot)
{
%obj.unmountImage(%slot);
}