Jump to content

Pluggy difficulties


acklavidian

Recommended Posts

ScriptName HumMod

 

long IncomingData

long ToGameFile

long OutgoingData

long FromGameFile

long windedness

 

Begin GameMode

set IncomingData to CreateString

set ToGameFile to CreateString

set OutgoingData to CreateString

set FromGameFile to CreateString

 

SetString ToGameFile "ToGame.txt"

SetString FromGameFile "FromGame.txt"

setString IncomingData " "

FileToString ToGameFile IncomingData

 

StringMsgBox IncomingData //This reports 502.25 which is right.

 

StringToFloat IncomingData

Message "IncomingValue:%g", IncomingData //This reports 0 on the first run, 4 on the second, then 17, then 21, then 25, then 29, and so on...

 

StringToInt OutgoingData

set OutgoingData to Player.GetAVForBaseActor Fatigue

Message "Current fatigue:% 10.10f", OutgoingData

 

End

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 

If it is not apparent from the above code I am pretty green when it comes to scripting for Oblivion so keep that in mind.

 

Ok so, toGame.txt has 502.25 stored on the first line, and nothing else (not even white space), except maybe an endline. The message box reports this correctly as a string but when I try to turn it in to a float with StringToFloat from pluggy I get (from the Message function) 0 on the first run, 4 on the second, and so on as I commented above.

Problem #1: I don't know why I am not getting something at least similar to what is in my file after I convert to a float.

Problem #2: I don't know why it is changing without me manipulating its variable in the script.

 

The next issue is that the Player.GetAVForBaseActor Fatigue doen't do anything. What I want is to get my Fatigue level, and store it in to a variable. Later I want to be able to "Damage" my fatigue in this script. I really don't know how to go about this.

Edited by acklavidian
Link to comment
Share on other sites

  • Recently Browsing   0 members

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