Jump to content

Scrip Help


fLokii

Recommended Posts

I am rather new at making scripts and most probably bad at it. I did make a mod that adds a distance DoF to the game and was able (still amazed i figured that one out lol) to script different ones to interior and exterior. But to further improve the gameplay i would like to add a change of imod on aim. and for the life of me i can't figure out the command for it.

This is the basic script:

scn 0fLokiS

 

Begin GameMode

 

if player.isininterior ==0

 

imod 0fLokiFX

imod 0fLokiFX3

RiMod 0fLokiFX4

Else if player.isininterior ==1

imod 0fLokiFX4

RiMod 0fLokiFX

 

 

Endif

 

End

 

Ideal would be two new if player lines for interior and exterior that would activate fx5 when aim button is pressed and deactivate when it is released. Hope someone can help out. Would be appreciated.

Link to comment
Share on other sites

Thank you for the quick reply and helping.

Unfortunately, seems i'm doing something wrong. Tried to make the script but it will not save. I downloaded nvse beta3, launched geck through nvse_loader -editor and script refuses to save.

Again i don't really know much about scripts so i tried two way.

Made a new script and tried copy/pasting your lines - no luck

Tried this wording

scn 0fLokiSTest

 

Begin GameMode

 

if IsKeyPressed 257

imod fLokiFX7

 

 

Endif

 

End

 

Again wont save

 

Tried adding to existing one like this

scn 0fLokiS

 

Begin GameMode

 

if player.isininterior ==0

 

imod 0fLokiFX

imod 0fLokiFX3

RiMod 0fLokiFX4

Else if player.isininterior ==1

imod 0fLokiFX4

RiMod 0fLokiFX

Else if IsKeyPressed 257

imod fLokiFX7

 

Endif

 

 

End

 

No save possible.

I am messing it up and have no clue how. If you could help it would be great and sorry if I'm a bit of a bother..

Link to comment
Share on other sites

Please post your script in code tags. That preserves indentation and forces them to use a fixed-width font, making them much easier to read.

 

The Fallout 3 GECK, at least, wouldn't recognise editorIDs starting with numbers when referenced in scripts. I haven't tested it in the New Vegas GECK, but it's likely still a problem. Try renaming all of your forms that have editorIDs starting with numbers so that they no longer start with numbers, then try to save your script.

 

On another note, it might be possible to use IsPlayerActionActive in order to test if the player is looking down iron sights without requiring NVSE.

 

Cipscis

Link to comment
Share on other sites

Yippie-Ki-Yay.. Made it work! Dunno what was wrong wouldn't save all at once but when i wrote line by line and saved in process it saved. Could be just my imagination and i missed something first time but.. hell works now so who cares :) Thanks to both of you guys.. Kudos go out and you rule ;) Totally appreciate the help.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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