CLEO Help camzoom.cs camera shake

CLEO related

RayWood

Active member
Joined
Mar 13, 2016
Messages
31
Reaction score
13
Location
ᴇᴜʀᴏᴩᴇ
OK so I have a problem with camzoom.cs
|
My camera starts shaking for some reason
did anybody encounter this problem?
Also if anyone knows how to fix that problem
your input would be much appreciated

CSS:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

0000: NOP

:Noname_2
wait 0
if
   Player.Defined($PLAYER_CHAR)
jf @Noname_2
if
82D8:   not actor $PLAYER_ACTOR current_weapon == 34
jf @Noname_2
if
82D8:   not actor $PLAYER_ACTOR current_weapon == 43
jf @Noname_2
0922: set_camera_zoom_from 101.0 to 0.1 timelimit 1000 smooth_transition 1
if and
key_down 49
key_down 17
jf @Noname_2
wait 500
jump @Noname_106

:Noname_106
wait 0
if and
key_down 49
key_down 17
jf @Noname_106
wait 500
jump @Noname_2
 

Attachments

  • CamZum.cs
    17.3 KB · Views: 3

RayWood

Active member
Joined
Mar 13, 2016
Messages
31
Reaction score
13
Location
ᴇᴜʀᴏᴩᴇ
For what you use this one?


Its just a camera modification that kinda zooms out the camera as shown by the code...
[by now i realized two things
1. any other camera modification like NoCameraFreeze.asi completley breaks the cleo
2. its on an always running script to insure that camera has the right zoom factor but something keeps messing things up
and the camera twitches (setting back and forth to 0.1)]
heres a vid of my problem
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
It's because you are spamming the Opcode 0922. It takes 1 second(1000ms) for the camera to complete the zooming transition. But you are already interrupting the zooming operation by executing the opcode 0922 immediately.
PHP:
:Noname_2 // start
wait 0 // minimum delay
...
... // Some conditions
...
0922: set_camera_zoom_from 101.0 to 0.1 timelimit 1000 smooth_transition 1 // smooth zooming that takes 1 second to finish(Asynchronous operation)
if and
key_down 49
key_down 17
jf @Noname_2 // if you didn't press CTRL+1 then go back on the start.

I don't quite understand the objective of your cleo. If you want an Instant Zoom, change the parameters of opcode 0922:
PHP:
0922: set_camera_zoom_from 0.1 to 0.1 timelimit 1000 smooth_transition 0
 
Last edited:

RayWood

Active member
Joined
Mar 13, 2016
Messages
31
Reaction score
13
Location
ᴇᴜʀᴏᴩᴇ
It's because you are spamming the Opcode 0922. It takes 1 second(1000ms) for the camera to complete the zooming transition. But you are already interrupting the zooming operation by executing the opcode 0922 immediately.
PHP:
:Noname_2 // start
wait 0 // minimum delay
...
... // Some conditions
...
0922: set_camera_zoom_from 101.0 to 0.1 timelimit 1000 smooth_transition 1 // smooth zooming that takes 1 second to finish(Asynchronous operation)
if and
key_down 49
key_down 17
jf @Noname_2 // if you didn't press CTRL+1 then go back on the start.

I don't quite understand the objective of your cleo. If you want an Instant Zoom, change the parameters of opcode 0922:
PHP:
0922: set_camera_zoom_from 0.1 to 0.1 timelimit 1000 smooth_transition 0

objective is a bit zoomed out camera... like this ... now.... everything works fine if i just set a 1 line (no checks)
but then sniper zoom while aimed does not work neither does camera zoom.
also when switching to sniper my camera zooms in like crazy and goes to normal (then sniper/camera aim is zoomable)
PHP:
82D8:   not actor $PLAYER_ACTOR current_weapon == 34
now i dont mind sniper doing that sh*t i just want to remove screenshake but so that it disables
itself when current_weapon is 34 or 43 and reapplies itself.
Also i tried to set it on key_down which kinda worked, it set the zoom to 0.1 but then is reverts itself to
normal (hence the constant opcode 0922 spamming)...
now i think what is needed is a way to freeze camera zoom on 0.1 which... yes could give noclip camera
but atleast it would kinda work...
 
Top