Product Chat / [SOLVED] Character running all the time

Author
Message
DareESP
2
Years of Service
User Offline
Joined: 15th Aug 2021
Location:
Posted: 26th Aug 2021 13:01
Hi there!

Does anyone know how to make the character run all the time by default and slow down when pressing the shift key?

Just the opposite of the usual behivor.

Thank you in advance!

The author of this post has marked a post as an answer.

Go to answer
PM
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 26th Aug 2021 13:28 Edited at: 26th Aug 2021 13:29
You mean the player i think. Not sure you can.
You can disable the run key but the shift key just doubles the normal speed you set so i think that part is hard coded ?
I could be wrong though.
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 26th Aug 2021 19:26 Edited at: 26th Aug 2021 19:36
Alright. Glanced at gameplayercontrol.lua // but no modify it. Just use stock insides w/ your own small blerb of script. If outside of gpc.lua, it would override all features inherent to the stock script. So- seeing as someone once offered some swimming feature inserted there, sure it's possible as most things are for those who want to put in the effort. Eh... maybe I'll look at it for a minute-- just look at it. {Ed}

Eh... took a look;

function never_stops_init(e)
end
function never_stops_main(e)
SetGamePlayerControlPushforce(2.0)
SetGamePlayerControlPushangle(GetCameraAngleY ( 0 ))
if (GetGamePlayerStatePlrKeyShift() == 1 or GetGamePlayerStatePlrKeyShift2() == 1) then
SetGamePlayerControlPushforce(1.0)
end
end
PM
DareESP
2
Years of Service
User Offline
Joined: 15th Aug 2021
Location:
Posted: 27th Aug 2021 08:52
Hi GubbyBlips,

Thank you so much for your help, I am also sure that by modifying the scripts it should be possible to do so. I was checking and playing with gameplayercontrol.lua changing the values when press Shit and shift 2 and the pushforce lines, however, it does not take absolutely any effect in the real game when testing it.

Actually, that script is too complex for me. Any advice guys? I see from the player properties in GameGuru that you can increase the speed of the player, however, the animation is the player walking and not running, which looks really bad in this case.

Thank you!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Aug 2021 09:57
This post has been marked by the post author as the answer.
remember to keep a backup of the original
you want to change this logic here a bit

so that it looks something like this
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11

Attachments

Login to view attachments
DareESP
2
Years of Service
User Offline
Joined: 15th Aug 2021
Location:
Posted: 27th Aug 2021 10:15
Hi smallg,

That is awesome!! I really need to learn deep about LUA scripting.

I tested the changes and it is almost perfect, however, the animation is not the running one, the character is still walking. It is possible to set also by default the running animation and when using Shift the walking one when the player slows down?
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 27th Aug 2021 12:43
yes in the snippet above change the first
SetGamePlayerControlIsRunning(0)
to
SetGamePlayerControlIsRunning(1)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
DareESP
2
Years of Service
User Offline
Joined: 15th Aug 2021
Location:
Posted: 27th Aug 2021 21:28
Thank you so much, your help was really nice. Currently, in my game, the modification is not working 100 percent perfectly but I want to continue playing with the LUA scripting. There is an issue when jumping but I am sure I will fix it.

Thanks a lot and have a good one!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 27th Aug 2021 23:19
Ah, I see. You meant 3rd Person view mode. I didn't catch that preliminary.
Would probably have to be inside the GPC.lua as 3pp is a bit of a soft casing
and not particularly ripe and matured. Glad to see you getting it.

Here's a situation where we need a "projects" system so that we can track all
the different GamePlayerControl.lua scripts we might want to experiment with
because the conventional renaming them all in windows is potentially wobbly.
PM

Login to post a reply

Server time is: 2024-04-26 03:56:53
Your offset time is: 2024-04-26 03:56:53