Jump to content

Script help


senterpat

Recommended Posts

scn PatProneQuestSCRIPT

short isProne
short oldscale
short stage

begin gamemode

if stage == 1
StopQuest PatProneSubQuest
set stage to 2
endif
 
if isprone != 1 && stage == 2 && (iskeypressed 51) && player.issneaking
 
    set oldscale to player.getscale

    player.setscale .2
 
    player.addperk PatPronePerk

    disableplayercontrols 0 1 0 1

    set isprone to 1
 
endif
 
if isprone == 1 && stage == 2 && (iskeypressed 52)

    player.setscale oldscale
 
    player.removeperk PatPronePerk
 
    enableplayercontrols 0 1 0 1

    set isprone to 0
 
    endif
 
if isprone == 1 && stage == 2 && player.issneaking == 0
 
    player.setscale oldscale
 
    player.removeperk PatPronePerk
 
    enableplayercontrols 0 1 0 1

    set isprone to 0
 
endif

end
 

This is the final tested script, I haven't got any errors, I have also changed the pipboy flag, because if the player has this small size, he can't see the pipboy anyway.

 

I have uploaded the esp for you as a reference, all created items begin with patprone.

 

Link: http://dfiles.eu/files/zb1ooyup2

Link to comment
Share on other sites

Thanks alot! That works perfectly. Though I fail to notice any changes in our files except for adding the period key to get up. And the priority change.

 

I failed to notice that you added the stage variable before, noob mistake.

 

Anyways, thank you sir, you are my personal hero. Took me like 3 months to learn enough of the scripting to accomplish my first script lol. I'll post the link in a bout an hour when I get the file up.

 

PS, thanks again

 

edit: http://newvegas.nexusmods.com/mods/49491

Edited by senterpat
Link to comment
Share on other sites

  • Recently Browsing   0 members

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