Jump to content

What am I missing? (need help)


minekip

Recommended Posts

Hi guys, I wonder what's wrong with my script... It seems that something's wrong with me so I'm doing stupid things the whole day!

Problem is: I have the function that runs OnPlayerLoadGame.

 

Function SetCarryWeight()
Actor ak = Game.GetPlayer()
float icw = ak.GetAV("CarryWeight")
CarryWeight_Storage.SetValue(icw)
float cw = icw - CarryWeight_Delta.GetValueInt()
float cwMax = CarryWeight_Limit.GetValueInt()
if cw > cwMax
	cw = cwMax
endIf
ak.SetAV("CarryWeight", cw)
endFunction

 

And somehow ingame I have CarryWeight set not to cw (if it supposed to be, for example, 125, when Limit is 150), but to cwMax! What's wrong??

Link to comment
Share on other sites

  • Recently Browsing   0 members

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