Need help with Movebob

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Need help with Movebob

Postby KeaganH » Mon Jun 07, 2021 7:41 pm

I want my mod to turn off movebob when you boot it up, but whatever I tried it never works. I've tried setting it to zero in cvarinfo like this:
Code: Select allExpand view
server float movebob = 0;

but I would always get this error message:
Script error, "Hog.pk3:cvarinfo" line 1:
cvar 'movebob' already exists

I know cvarinfo is for custom cvars but I don't know any other ways then just typing movebob 0 into the console manually, but I know it's not going to be like that for everyone's copy of GZDoom. So I'd really appreciate the help.
Joined: 25 Sep 2020

Re: Need help with Movebob

Postby SanyaWaffles » Mon Jun 07, 2021 10:03 pm

CVARINFO is for setting up console variables that don't exist all ready. You'll need to do it differently.

1.) If the mod is a standalone TC (and doesn't require DOOM2.WAD or any other IWAD) you can use DEFCVARS to set it up perhaps. This won't work if your mod is just a mod loaded on top of DOOM2.WAD

2.) Use WRF_NOBOB on A_WeaponReady to make it so weapons cannot bob.

3.) Use ZScript to customize how the bob works. This is probably the most complex.
User avatar
The Truth Will Set You Free
Joined: 25 Apr 2013
Location: Eastern Ohio
Discord: SanyaWaffles#5095
Twitch ID: sanyawaffles
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Need help with Movebob

Postby KeaganH » Tue Jun 08, 2021 5:42 am

Thanks, I just found out about Player.ViewBob so that fixed it. And I've already had the WRF_NOBOB in the A_WeaponReady.
Joined: 25 Sep 2020

Return to Scripting

Who is online

Users browsing this forum: Virathas and 0 guests