im having trouble with getting the vignette to reset back to the environment settings after changing it, could someone tell me what im doing wrong here:
//scope
function Armor::onTrigger(%this,%obj,%slot,%val)
{
%CurrentlymountedImage = %obj.getMountedImage(0);
if(%slot == 4 && %val && $UseScope != 1 && isObject(%obj.getMountedImage(0)) && %obj.getMountedImage(0).item.ScopedFOV > 0)
{
if(%obj.getMountedImage(0) == %CurrentlymountedImage.item.ImagemainState.getID())
{
%obj.updateArm(%obj.getMountedImage(0).item.ImageScopeState,0);
%obj.mountImage(%obj.getMountedImage(0).item.ImageScopeState,0);
%obj.client.setControlCameraFOV(%obj.getMountedImage(0).item.ScopedFOV);
if($SetVignette != 1)
{
commandToClient(%obj.client, 'SetVignette', false,"0 0 0 1");
}
}
else if(%obj.getMountedImage(0) == %CurrentlymountedImage.item.ImageScopeState.getID())
{
%obj.updateArm(%obj.getMountedImage(0).item.ImageMainState,0);
%obj.mountImage(%obj.getMountedImage(0).item.ImageMainState,0);
%obj.client.setControlCameraFOV(90);
if($SetVignette != 1)
{
commandToClient( %obj.client, 'SetVignette', $EnvGuiServer::VignetteMultiply, $EnvGuiServer::VignetteColor );
}
}
return;
}
Parent::onTrigger(%this,%obj,%slot,%val);
}
specifically this line:
commandToClient( %obj.client, 'SetVignette', $EnvGuiServer::VignetteMultiply, $EnvGuiServer::VignetteColor );
the console returns something like (, ) is not a color...
ALSO:
when i drop my weapons they don't disappear from your hand, (it will is your close and reopen your inventory) this happens when the weapon is in its out of ammo state... (perhaps others too, still need to test that)
ALL ISSUES FIXED NOW!, SOLUTIONS:
vignette:
//scope
function Armor::onTrigger(%this,%obj,%slot,%val)
{
%CurrentlymountedImage = %obj.getMountedImage(0);
if($Sky::VignetteColor !$= "")
{
%obj.vignetteColor = $Sky::VignetteColor;
}
else
{
%obj.vignetteColor = "0 0 0 0";
}
if(%slot == 4 && %val && $UseScope != 1 && isObject(%obj.getMountedImage(0)) && %obj.getMountedImage(0).item.ScopedFOV > 0)
{
if(%obj.getMountedImage(0) == %CurrentlymountedImage.item.ImagemainState.getID())
{
%obj.updateArm(%obj.getMountedImage(0).item.ImageScopeState,0);
%obj.mountImage(%obj.getMountedImage(0).item.ImageScopeState,0);
%obj.client.setControlCameraFOV(%obj.getMountedImage(0).item.ScopedFOV);
if($SetVignette != 1)
{
commandToClient(%obj.client, 'SetVignette', false,"0 0 0 1");
}
}
else if(%obj.getMountedImage(0) == %CurrentlymountedImage.item.ImageScopeState.getID())
{
%obj.updateArm(%obj.getMountedImage(0).item.ImageMainState,0);
%obj.mountImage(%obj.getMountedImage(0).item.ImageMainState,0);
%obj.client.setControlCameraFOV(90);
if($SetVignette != 1)
{
commandToClient( %obj.client, 'SetVignette', $EnvGuiServer::VignetteMultiply, %obj.VignetteColor );
}
}
return;
}
Parent::onTrigger(%this,%obj,%slot,%val);
}
(btw, im using %obj.vignetteColor now so i don't need to redefine %vignetteColor for every weapon's unmount debug scripts)
droping issues:
//drop debug
function serverCmddropTool(%client, %slot)
{
%player = %client.player;
if(isObject(%player))
{
%client.player.unMountImage(0);
parent::serverCmddropTool(%client, %Slot);
}
}
both of witch are packaged accordingly of course...