SetCamera
Jump to navigation
Jump to search
action native void SetCamera (Actor cam, bool revert = false)
Usage
Sets the players' camera to the actor specified on the cam parameter. Does nothing if not called from a player.
Parameters
- Actor cam
- An actor pointer to the actor to set the calling players' view to.
- bool revert
- False by default, when set to true. The player will be able to revert back to their original view by moving. This is the same as in the ChangeCamera ACS function.
Examples
This special pistol has an altfire that changes the players' camera to that of their attacker, if any. But the player can get out of their attackers' view by simply moving.
class AttackerCamPistol : Pistol
{
States
{
AltFire:
PISG A 4
{
//Sets the camera of the player to their attacker, if any. With the ability to revert back to their view by moving.
self.SetCamera(self.player.attacker,true);
}
Goto Ready;
}
}