Altering Jump Behavior mod

Post » Sat Feb 19, 2011 1:33 am

So the goal is to alter the jumping behavior in this way:
1. player presses jump button and releases right away, very quickly = jump up a small amount
2. player presses jump button and hold for a short time, say 0.1 second, and then release = jump up a medium height
3. player presses jump button and hold for a long time, say 0.3 second and then release = jump up as high as the player's skill allows
4. player presses jump button and hold but doesn't release at all = wait for 0.3 seconds and jump up as high as the player's skill allows

Im very new to modding and I only know how to add objects in the game world, but I don't know how to modify the key stroke.

Does anyone think this mod is possible to make?
User avatar
Suzie Dalziel
 
Posts: 3443
Joined: Thu Jun 15, 2006 8:19 pm

Post » Sat Feb 19, 2011 12:33 am

Well, it is definitely possible :)

The Below script doesn't quite do what you want-- it takes a while to build up a 100 Point Jump (but that can be resolved with a bit of work, I'm sure)-- to use it, you'll need OBSE (I'd recommend Version 18+ as this is the version I have, so it should work). Then:

1. Copy this Code into a New Script
2. Set the Script to "Quest" via the little drop-down (it says Object at first)
3. Save the Script
4. Click the big Q
5. Right-click the long white column
6. Select "New"
7. Name it anything-- I recommend ZCDMJMMain, to keep it inline with the Script
8. Set the Priority to 90
9. In the drop-down next to priority, select this Script
10. Save and enjoy :)

As I say, this is a very-basic version, and doesn't do exactly what you want-- but it gets the harder stuff out of the way, and gives you a frame to work with.

ScriptName ZCDMJMMainScriptShort PCJumpShort StopJumpShort JumpKeyShort JumpTimerShort PartShort NewAVShort DoJumpFloat fQuestDelayTimeBegin MenuMode	If ( StopJump == 1 )		Set StopJump to 0		EnableControl 13	EndIfEndBegin GameMode	Set fQuestDelayTime to 0.0000001	DisableControl 13	If ( Part == 0 )		MessageBox" Please Press And Hold the Key you use to Jump, and then Press OK"		Set Part to 1	ElseIf ( Part == 1 )			Set JumpKey to ( GetKeyPress 0 )		MessageBox" Jump Key Set."		Set Part to 2	EndIf	If ( StopJump == 0 )		Set StopJump to 1	EndIf	If ( IsKeyPressed3 JumpKey )		If ( JumpTimer == 0 )			Set PCJump to ( Player.GetAV Acrobatics )			Player.SetAV Acrobatics 0		EndIf		Set JumpTimer to ( JumpTimer + 1 )		If ( Player.GetAV Acrobatics < PCJump )			Set NewAV to ( Player.GetAV Acrobatics )			Set NewAV to ( NewAV + 1 )			Player.SetAV Acrobatics NewAV		EndIf		Set DoJump to 1		Return	EndIf	If ( DoJump >= 1 )		Set DoJump to ( DoJump + 1 )	EndIf	If ( JumpTimer != 0 )		If ( DoJump >=3 ) 			TapKey JumpKey			Set JumpTimer to 0		EndIf	EndIf	If ( DoJump == 10 )		Set DoJump to 0		Player.SetAV Acrobatics PCJump	EndIfEnd

User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Sat Feb 19, 2011 5:00 am

thanks!
User avatar
Tessa Mullins
 
Posts: 3354
Joined: Mon Oct 22, 2007 5:17 am


Return to IV - Oblivion