(ACS) Terminating a script if bool cvar returns false

Thu Jan 20, 2022 12:41 am

I am using Zombie Killer's enhanced third person code in a project, and it uses a custom boolean cvar, that uses a acs script, to create a rotating chasecam.
I was able to create a toggle for the camera since originaly you had to disable the chasecam via console, however, i noticed that the specific script that
creates the rotating chasecam, also causes issues with my mod's pitch and angle effects, such as when i fire a weapon, the A_SetPich(pitch+2) does nothing,
so my idea is that if i can terminate the script wenever i toggle the chasecam off, and while in first person all my A_SetPitch and A_SetAngle effects could work correctly, at least i hope that works, not sure how to go about this exactly im very new to acs.

this is the zombie killer's acs
Spoiler:


This is the Keyconf i made to make it toggle on or off, note the "chase_active" is the boolean that by default is set to false
Spoiler:


And this is the code i attempted to create to terminate the script wenever the chasecam is off
Spoiler:


The script i made most likely isn't correct, but even if it was im not sure it would even do what need.

Re: (ACS) Terminating a script if bool cvar returns false

Thu Jan 20, 2022 7:35 am

Ok so i just surprised myself today, i cant believe it but my script actually works, i only made two changes to it, the only thing that doesn't quite look right,
is when i exit first person mode and go into chase cam it does a quick flash like glitch that goes away right after, its not too bad tho but,
if there is a way to fix it, i would appreciate any advice.

This is how i changed the code, i only turned "CameraMain" ENTER to (void) and re arranged true and false, i still can't believe it worked tho :D
Spoiler: