Jump to content

I need help with my script


shinelucid

Recommended Posts

I'm trying to simulate a 1st person view in 3rd person and to be able to avoid clipping I have to script a different camera position for the sighted aiming animation, I figured out that SetINIFloat doesn't work when continuously being called by the script, it just makes it default to a certain position other than the one I set it to, it only applies when I release the aiming button so I had to make a discrete execution of the function, I found the GetINIFloat function in the ck wiki but it gives me and error when compiles, I'm no papyrus expert so bear with me, here is my code:

Scriptname aim_script extends Quest

Event OnQuestInit()
	RegisterForAnimationEvent(game.GetPlayer(), "sightedStateEnter")
endEvent

Event OnAnimationEvent(ObjectReference akSource, string asEventName)
	if(Utility.GetINIFloat("fOverShoulderCombatPosZ:Camera") != 30 && Utility.GetINIFloat("fOverShoulderCombatPosY:Camera") != 30)
	if (asEventName == "sightedStateEnter")
		Utility.SetINIFloat("fOverShoulderCombatPosZ:Camera", 30.0)
		Utility.SetINIFloat("fOverShoulderCombatPosY:Camera", 30.0)
	endif
	endif
endEvent

the compiler returns these errors:

 

GetINIFloat is not a function or does not exist
cannot call the member function GetINIFloat alone or on a type, must call it on a variable
cannot compare a void to a int (cast missing or types unrelated)

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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