Jump to content

New to scripting.


Yamcakes

Recommended Posts

I'm not entirely sure how to do this one. I went through the tutorials and such, but it doesn't seem to work in-game. Yes I am using the OBSE CS, and game launcher.

 

scn usealtskeletonyam
begin GameMode

if(Player.GetIsSex male == 1)
			setPlayerSkeletonPath "characters\_malemanly\skeleton.nif"

endif
end

 

What am I doing wrong?

Link to comment
Share on other sites

Need more information. What kind of script is it, and what is the script attached to? How often do you want to run this script?

 

If, for example, you just want to run this script once per character, I'd do this:

1. Write the script.

scn usealtskeletonyam
short doonce
begin GameMode

if doonce == 0
    if(Player.GetIsSex male == 1)
          setPlayerSkeletonPath "characters\_malemanly\skeleton.nif"
    endif
    set doonce == 1
endif

end

2. Set it as a quest script.

3. Save it.

4. Make a new quest.

5. Attach the script to the quest.

6. Make sure "Start Game Enabled" is checked

Link to comment
Share on other sites

I just like my character to pull from a seperate skeleton, and set of animations outside the _male folder. I haveno problem getting NPC's to use them, but setting the player's skeleton to one located in a different folder has no effect, and I know that the player can be scripted to use another folder, as I have seen in another mod, so I'm trying to figure out how to do this. What I grabbed here is an excerpt of that script, modified with my information. It was something gigantic, and also involved adding tons of other things, so I cut what I thought was relevent. I will try your suggestion now!
Link to comment
Share on other sites

Oops. That one line in my code should be "set doonce to 1" instead of "set doonce == 1"

 

I've never used alternate skeletons before. That being said, there may be more stuff you gotta do to make it work without crashing besides simply using the setplayerskeletonpath function. I don't know, sorry.

Link to comment
Share on other sites

Edit: I reread some of your comments and realized my suggestion had already been tried.

 

 

It looks to me like the DoOnce is misplaced and would change its value and prevent further function without ever executing the code. I would think it should be more like this:

 

scn usealtskeletonyam
short doonce
begin GameMode

if doonce == 0
    if(Player.GetIsSex male == 1)
          setPlayerSkeletonPath "characters\_malemanly\skeleton.nif"
          set doonce to 1
    endif   
endif

end

Link to comment
Share on other sites

  • Recently Browsing   0 members

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