Author Topic: Mount multiple objects to player  (Read 1372 times)

Is there a way I can mount 2 objects to a player? Because i'm using skoopdahoops armor, and I have a weapon that mounts to your back after you unmount it, and when it mounts on your back the armor unmounts. So I can't have both on at the same time, but I was wondering if there was a way I could have both of them?

You can only put 4 images on a player at the same time, but you can mount an invisible player to the player and then put the images on that as a workaround

but you can mount an invisible player to the player and then put the images on that as a workaround
hah thats pretty neat

You can only put 4 images on a player at the same time, but you can mount an invisible player to the player and then put the images on that as a workaround

can you mount this invisible player to a specific node on a player? like the hand? because that would be freakin useful man.

if you can, can i see the code on how to do that?

can you mount this invisible player to a specific node on a player? like the hand?
yes

I'm not too sure how well it's actually going to work. I tried this in the past with the socks and there were some issues with uncrouch not working randomly. Didn't really figure out why and forgot the socks existed..

Oh well, thanks for the reply tho.

to fix that, youll have to go into the script of skoopdahoops armour image and then swap the mountPoint to 3

but after that you will also have to reposition the armour to the torso ( using eyeOffset and Offset in the image ) which requires a lot of testing to check if the armour completely fits in perfectly, but but if you want to skip this, heres the steps ( hard but no offsets are required )

firstly we go into skoops armour again and change the armours mountpoint to 2
secondly we add this in, change gayImage to the armours image name
function gayImage::onMount(%this, %obj, %slot)
{
   %obj.mountImage(gayImage, 3);
}
after that i think it should work, though this hacky method is known to be sometimes glitchy but if you want to skip the offsets, use this method... though im not too sure if itll work
if it crashes, add this in
function gayImage::onunMount(%this, %obj, %slot)
{
   %obj.unMountImage(3);
}

You can only put 4 images on a player at the same time, but you can mount an invisible player to the player and then put the images on that as a workaround

How would I mount an invisible player to a player?

How would I mount an invisible player to a player?
Just create a new AIPlayer object, hide all nodes and mount it to the player. I think you'd use Player::mountObject. You could also create a new player type with an invisible model and no collision to make it better.

Make sure you get rid of the AIPlayer when the player is killed or deleted!