A_SetRoll
Jump to navigation
Jump to search
Warning: This feature is GZDoom specific, and is not compatible with ZDoom! To see all of GZDoom's specific features, see GZDoom features. |
A_SetRoll (float roll [, int flags [, int ptr]])
Usage
Sets the calling or pointed to actor's roll to the value of the first parameter. It can be used with the roll DECORATE variable to modify the actor's current roll. This affects the player camera, models and the sprites of actors with the ROLLSPRITE flag.
For players, the view is rolled and so is the model, if one is supplied.. Positive numbers rotate the screen counter-clockwise (left side rising, right side lowering), while negative numbers rotate it clockwise (right side rising, left side lowering).
Parameters
- roll: The actor's new roll, in degrees. The range is [0,359].
- flags: The following flags can be combined by using the pipe character | between the constants names:
- SPF_INTERPOLATE: Interpolates the view, smoothing it out over the delay of 1 tic.
- ptr: The actor to change its roll. This is an actor pointer. Default is AAPTR_DEFAULT, which corresponds to the calling actor.
Examples
This example is of a floating object that is rotated randomly between 0 and 359 degrees every time it is loaded into the game.
ACTOR RotatedThing { Radius 32 Height 64 +NOGRAVITY +ROLLSPRITE +ROLLCENTER States { Spawn: FBTE A -1 NoDelay A_SetRoll(random(0, 359)) Stop } }