[SCRIPT] Inverted Controls - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Inverted Controls (/thread-26601.html) Pages:
1
2
|
Inverted Controls - Neelke - 10-06-2014 So, I've wanted to create a script where the player gets his controls inverted. I tried doing it like this: Code: void CollideReverseControls(string &in asParent, string &in asChild, int alState) This works for the look speed, but not the move and run speed. Instead it locks itself to just down and left. It refuses to go up or right no matter what I press. Could there be a way to do inverted controls another way? RE: Inverted Controls - Viper85626 - 10-06-2014 I actually don't think it's possible through scripting. I may be wrong though. RE: Inverted Controls - MrBehemoth - 10-07-2014 I think Viper is right. ...But I can't resist a scripting challenge! I'm guessing you're going for a drunk/drugged effect. I have an idea that you could do with the 1.3 patch, although it would be clunky and not quite what you're after, but interesting to experiment with... Spoiler below!
RE: Inverted Controls - Neelke - 10-07-2014 Slightly yea. What makes it strange though is the fact that this works for when you look around, the controls of the camera gets inverted through this. It's just the run and move that doesn't work. Instead the problem happens that I explained above. And I didn't see your example. When I get back home I'm gonna test it out. Thanks RE: Inverted Controls - Neelke - 10-07-2014 Update: It didn't work. However, I did try adding a dot to the global string. SetGlobalVarFloat("PlayerPrevX", GetPlayerPos.X()); They then told me I got an illegal use of an int. So we are on the right track here. RE: Inverted Controls - Mudbill - 10-07-2014 Why would a period there help? GetPlayerPosX is the name of a script function that calculates the X position. I don't think GetPlayerPos has been implemented as its own function and have it accept inputs like that... if C++ even works that way. RE: Inverted Controls - MrBehemoth - 10-08-2014 Yup, it definitely wouldn't have a dot. Just checking: you're definitely using the 1.3 patch, right? It wouldn't work without it. I'll test it tonight and debug if necessary. RE: Inverted Controls - Neelke - 10-08-2014 I don't actually use 1.3. Is it something I must have for this to work? RE: Inverted Controls - Viper85626 - 10-08-2014 For that particular set of code, yes. RE: Inverted Controls - Neelke - 10-08-2014 Crap. Well at least we can figure something out with this despite me not being able to use it. I could probably create something too for people with version 1.2, but we'll see I guess. If nothing comes up, I guess I have to be happy with an inverted camera. It's hard too so it's fine |