Knas Posted November 23, 2015 I've now spent many hours trying to figure out how to make my map execute CVARs. The reason is that I have reduced the movement speed of the player and for some reason that causes some insane headbobing. In short, it's horrible if you have motion sickness. So I want the map to automatically change the movebob CVAR when it's loaded so I have added this to the KEYCONF lump: alias bobfix "movebob 0.1"; Problem 1: I don't know how to make script the executes this alias. I've thought about binding it to a key but then again I don't know how to make a script that "presses a button". Problem 2: If I execute this alias manually it's saves the movebob value to the ini file so it is used in all other wads too... How do I avoid this? So any suggestion to what I can do (and why does this have to be so complicated)? 0 Share this post Link to post
snapshot Posted November 23, 2015 I don't think this is possible (at least not in the actual ZDoom version) , i heard it is possible to create hidden player classes but i'm not sure if it's possible to change the class of player using an ACS Script, if you give each class a custom bobstyle and change it with an ACS Script you're done . 0 Share this post Link to post
Gez Posted November 23, 2015 You cannot change CVARs from a script. ZDoom will never let you do that (except for CVARs that you define yourself). However, what you can do is replace all the weapons to change their Weapon.BobSpeed property. 0 Share this post Link to post
Knas Posted November 23, 2015 Gez said:You cannot change CVARs from a script. ZDoom will never let you do that (except for CVARs that you define yourself). However, what you can do is replace all the weapons to change their Weapon.BobSpeed property.I know that, but I thought that only changed how much they sway back and forth and that's not the problem. The camera moving up and down is what's causing the problems. 0 Share this post Link to post
Gez Posted November 23, 2015 Oh, yeah, good point. Thinking about it I'm kinda surprised that there isn't a Player.MoveBob property. 0 Share this post Link to post
Knas Posted November 23, 2015 Gez said:Oh, yeah, good point. Thinking about it I'm kinda surprised that there isn't a Player.MoveBob property. Me too, and from my searches this has been a problem for people for many years. 0 Share this post Link to post
Knas Posted November 23, 2015 So I tried to do some workarounds. This is the latest. alias bobfix "movebob 0.1; rebind bobnorm" alias bobnorm "movebob 1; rebind bobfix" bind k bobfix But whatever I do the game refuse to save the bind. I've tried to map it to different keys, but all the ini file says is: k=movebob edit: I just manually changed the ini to k=bobfix and it works perfectly. Why isn't the bind line working..? 0 Share this post Link to post
snapshot Posted November 24, 2015 Knas said:So I tried to do some workarounds. This is the latest. alias bobfix "movebob 0.1; rebind bobnorm" alias bobnorm "movebob 1; rebind bobfix" bind k bobfix But whatever I do the game refuse to save the bind. I've tried to map it to different keys, but all the ini file says is: k=movebob edit: I just manually changed the ini to k=bobfix and it works perfectly. Why isn't the bind line working..? Have you tried to put these on the kEYCONF ? 0 Share this post Link to post
Knas Posted November 24, 2015 DMGUYDZ64 said:Have you tried to put these on the kEYCONF ? Ah, yes. That's where they are. edit: I figured out the problem. It has to be defaultbind instead of bind. Don't know why but bind doesn't seem to do anything. 0 Share this post Link to post
Edward850 Posted November 24, 2015 Because that would allow you to rebind someone else's keys. Very much a bad idea. 0 Share this post Link to post
Knas Posted November 25, 2015 Edward850 said:Because that would allow you to rebind someone else's keys. Very much a bad idea. Not if there would have been a feature to have a custom profile for each wad. 0 Share this post Link to post
Edward850 Posted November 25, 2015 Aside from the part where bind would imply you couldn't rebind the key at all, as KEYCONF would reset it every time it was parsed, from a user end standpoint it would also be infuriating over all. I certainly wouldn't want to rebind my keys for literally every mapset I load, this includes if I change my desired bind layout later. It's a mod, not a game, and thus one would expect the game settings to still be applied. That's why defaultbind exists, so you can have an alias that has a low priority bind, unique to your mod. It's already independent to your keyconf profile, as well. 0 Share this post Link to post