Author Topic: If Image is unmounted/mounted Still need halp  (Read 1334 times)

How do I check when a specific image is unmounted
« Last Edit: September 25, 2011, 02:55:46 PM by swollow »

Check if the mounted image is not the image you're looking for.

K I'm trying to use
Function servercmdunusetool(%obj)
but I have no idea what the variables are for it

%obj.getMountedImage() != image

I'm not thinking clearly right now can someone show me how to do this:
Whenever a specific image is mounted it changes datablocks
Whenever a specific image is unmounted it changes datablocks

K I'm trying to use
Function servercmdunusetool(%obj)
but I have no idea what the variables are for it

It is a servercmd...
The variable is %client

It is a servercmd...
The variable is %client
<eye twitch> Sorry I'm not thinking clearly right now :|

I'm not thinking clearly right now can someone show me how to do this:
Whenever a specific image is mounted it changes datablocks
Whenever a specific image is unmounted it changes datablocks
Don't use serverCmds. Package mountImage and unMountImage and check if the image is the one you want.

Don't use serverCmds. Package mountImage and unMountImage and check if the image is the one you want.
I'm so loving confused
Am I supposed to do this:
function ImageName::OnunmountImage(%this,%obj,%slot)
or
function Player::OnunmountImage(%this,%obj,%slot)
or
function Player::unmountImage(%this,%obj,%slot)

I don't know these functions :|

This is what I use for Slayer CTF:

Code: (ctf.cs) [Select]
package Slayer_Gamemode_CTF
{
function Player::mountImage(%this,%image,%slot,%a,%b)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;

parent::mountImage(%this,%image,%slot,%a,%b);
}

function Player::unMountImage(%this,%slot,%bypass)
{
%curImage = %this.getMountedImage(%slot);
if(!%bypass && isObject(%curImage) && %curImage.className $= "SlyrCTF_FlagImage")
return;

parent::unMountImage(%this,%slot);
}
};
activatePackage(Slayer_Gamemode_CTF);

You could change that up for what you need. And you can get rid of the %bypass variable in unMountImage btw.

Code: [Select]
package FatManSlowWalk
{
function Player::unMountImage(%this,%slot)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage) && %curImage.className $= "FatManImage")
{
%this.setdatablock("PlayerTacArmor");
}
if(isObject(%curImage) && %curImage.className $= "FatManEmptyImage")
{
%this.setdatablock("PlayerTacArmor");
}
parent::unMountImage(%this,%slot);
}
};
activatePackage(FatManSlowWalk);
I'm gonna freaking spaz out I've been sitting here trying stuff similar to this for hours what am I doing wrong

Sorry, %curImage.className would only work with my mod, I should have mentioned that. Change every %curImage.className to %curImage.getName()

Sorry, %curImage.className would only work with my mod, I should have mentioned that. Change every %curImage.className to %curImage.getName()
Oh gawd thank you

Code: [Select]
package FatManSlowWalk
{
function Player::mountImage(%this,%image,%slot,%a,%b)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage))
{
if(%curImage.getName !$= "FatManImage" || %curImage.getName !$= "FatManEmptyImage")
{
if(!isObject(%this.minigame))
{
%this.setDataBlock("PlayerStandardArmor");
}
else
{
%this.setDataBlock(%this.minigame.playerDatablock);
}
}

}
parent::mountImage(%this,%image,%slot,%a,%b);
}
function Player::unMountImage(%this,%slot)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage))
{
if(%curImage.getName $= "FatManImage" || %curImage.getName $= "FatManEmptyImage")
{
if(!isObject(%this.minigame))
{
%this.setDataBlock("PlayerStandardArmor");
}
else
{
%this.setDataBlock(%this.minigame.playerDatablock);
}
}
parent::unMountImage(%this,%slot);
}
};
activatePackage(FatManSlowWalk);
k I need a little bit more help
-How can I call the minigames playerdatablock I looked at the parachute addon but it requires %client
-Why does the datablock change only work when your using the fatmanimage and not the fatmanemptyimage?

%this.client?
i think %this is the player, just from glancing at it