I am making a feature where I need to get the player who is mounted to slot 1 'getmountedobject(1)'. if i am sitting in the bot vehicle and the player gets on, getmountedslot(1) will return me, even though I am in the drivers seat. wtf is wrong? i noticed this as a problem when making a driver only vehicle command too.
could it be related to this?
function armor::onMount(%this,%obj,%col,%slot)
{
Parent::onMount(%this,%obj,%col,%slot);
if(%col.getDataBlock().getId() == HeedTurret.getId())
{
%client = %obj.client;
if(isObject(%client))
ServerCmdUnUseTool(%client);
if(%slot $= 1)
{
if(%col.loaded != 0)
%obj.dismount();
else
%col.MountedPlayer = %obj;
}
}
}the code i need it for:
if(isobject(%mount.getmountedobject(1)))
{
%player = %mount.getmountedobject(1);
%player.dismount();
%player.setTransform(%mount.getSlotTransform(2));
%player.setvelocity(getwords(%vec2,0,1) SPC %upforce);
}it should launch the player in slot 1, but if they mount after i am already mounted in slot 0, it will launch me.