Author Topic: Need help with setting camera angles after death (Solved by Port)  (Read 788 times)

Code: [Select]
$Angle1 = "-78.4192 -41.6755 104.405 1 0 1 1.63";

function ApplyCamAngle(%Client)
{
%camera = %client.camera;

%bot = new aiPlayer(%Client.name)
{
datablock=playerStandardArmor;
position="0 0 -20";
};

%Client.BotDeathThingy = %Bot;

%client.setControlObject(%camera);
%camera.setControlObject(%Bot);
%camera.setTransform($Angle1);
}
}
package SwolDeath
{
function gameConnection::onDeath(%Client, %KillerPlayer, %Killer, %DamageType, %a)
{
parent::onDeath(%Client, %KillerPlayer, %Killer, %DamageType, %a);
Schedule(1500,0,ApplyCamAngle,%Client);
}
};
ActivatePackage(SwolDeath);

if I apply the camera angle when the player is alive, all of it works but after the player dies the camera doesn't orient itself properly to $Angle1, it instead remains where the player died, how can I fix this
« Last Edit: August 12, 2012, 12:23:20 PM by swollow »

I think the problem is that the camera gets set into "orbit mode" when you die, disallowing it to move, can someone tell me how to remove orbit mode

Did you look at GameMode_Rampage yet?

Did you look at GameMode_Rampage yet?
yes this code was half taken from gamemode rampage, the problem is the player is never dead in rampage

yes this code was half taken from gamemode rampage, the problem is the player is never dead in rampage
Well, if you're having problems, why do you have to have the player be dead? You could just pretend the player is dead and set the camera up correctly

well okay I'll try it, it just seemed like that was over complicating things, if someone knew how to take it out of orbit mode

Add %camera.setFlyMode(); before your %camera.setTransform call.

oh thanks so much, should have dumped the camera classes, forgot about that