Author Topic: handicapped mountImage points  (Read 1463 times)

Quote
I'm trying to get a set of armor (headpoint and chestpoint) to work with a double handed weapon (mountpoint0 and mountpoint1)

The issue: using mountImage(image, slot) works except with slot 3, which for some handicapped reason disappears whenever taking damage or teleporting. This is the mountpoint for my helmet that im using.

Is there a better system for getting lhand + rhand + chest + headskin image mounting without one of them actually disappearing sometimes?

In order to effectively use head+chest armor in combination with akimbo weapons, the emitter mountpoint must be replaced. This is mountpoint 3 on the player, ie %player.mountImage[/b](image, 3);

The following code can be used to overwrite the emitter node so that it won't make chest-mounted armor disappear:



//$bodymount is 3
//isArmor should be a value given to the armor MountedImage


function Player::mountImage(%player, %image, %slot, %loaded, %skin)
{
        %image2 = %player.getMountedImage($bodyMount);
        if(!(%image.stateEmitter[1] $= "")) //prevents spam from getclassname
        {
        if(%image.stateEmitter[1].getClassName() $= "ParticleEmitterData" && isObject(%image2) && %image2.isArmor)
        {
              //Disabling all emitter-based images will also disable the brick-trail. so we exclude this:
              if(%image.stateEmitter[1] $= "brickTrailEmitter")
              return parent::mountImage(%player, %image, %slot, %loaded, %skin);
            
              //Everything else is ignored
              return;
        }
        }
        return parent::mountImage(%player, %image, %slot, %loaded, %skin);
}




Original code credit goes to JakeBlade and Darksaber for helping
« Last Edit: June 11, 2016, 08:36:16 PM by Path »

It's because the "OUCH!" emitter is mounted to slot 3.

It's because the "OUCH!" emitter is mounted to slot 3.
well that explains it

i still need a good system though

Have you tried slot 4?

Have you tried slot 4?
only slots 0-3 are valid, according to every source torque has provided.
also anything above 4 doesn't work, i've tested

Pain and admin teleport emotes mount to slot 3. Make a package to override them when you have your armor equipped.

Pain and admin teleport emotes mount to slot 3. Make a package to override them when you have your armor equipped.
Alright thank you, I managed to fix the problem. Posted solution code in OP