Jump to content

Need Help Solving a Script Issue


GrayWolf04

Recommended Posts

I created the following code to change the speed of the player and the follower to be incresed if an item is equiped while the player is crouching. I want it to work only if the player is crouching, and if they leave crouching and return to standing, the script should force removal of the token and reset the speed to normal. The way I have below currently causes the game to freeze, and I think it's due to an infinite loop. The loop though is the only way I can think of to solve this problem. I also want to increse the jump height as well, but I don't know how to do this. Any help would be appreciated.

 

 

[b][size="2"]scn SpeedScript

begin OnEquip && OnUnequip

Label 2

if Player.GetEquipped SpeedToken && Player.IsSneaking >= 1

Player.SetAV SpeedMult 250

DogmeatREF.SetAV SpeedMult 250

Player.UnEquipItem SpeedToken

Goto 1

Else

Label 1

if Player.IsSneaking <= 1

Player.UnEquipItem SpeedToken

Player.SetAV SpeedMult 100

DogmeatREF.SetAV SpeedMult 100

GoTo 1

else

GoTo 2

EndIf

EndIf

End

[/b][/size]

 

 

 

EDIT:

 

Here is the most recent code that I have gotten to work, but the player still has the effect while standing until the item is manually removed.

 

[b][size="2"]scn SpeedTokenScript

begin OnEquip && OnUnequip

if Player.GetEquipped SpeedToken && Player.IsSneaking >= 1

Player.SetAV SpeedMult 250

DogmeatREF.SetAV SpeedMult 250

Player.UnEquipItem SpeedToken

Else

if Player.IsSneaking <= 1

Player.UnEquipItem SpeedToken

Player.SetAV SpeedMult 100

DogmeatREF.SetAV SpeedMult 100

EndIf

EndIf

End

[/b][/size]

Edited by GrayWolf04
Link to comment
Share on other sites

GrayWolf04 - Hello!

 

Sorry, I'm just getting my head around scripting too, so I can't help you there. :)

 

"I also want to increse the jump height as well, but I don't know how to do this. Any help would be appreciated."

 

I know there's an engine issue with increasing jumps, you can end the jump landing in mid air as if on a ledge. I think some got around this with invisible ledges or some such.

 

Powered Power Armor by Imp of the Perverse has increased jump, you should take a look at how it was done there:

 

http://fallout3.nexusmods.com/mods/13361

 

Hope this helps!

 

Prensa

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...