Deleted28154640User Posted November 18, 2015 Posted November 18, 2015 Hiya everyone Im having some issues getting the following script working any help is greatly apprecieated Scriptname zzz_illusionResearchScript extends activemagiceffect Actor Property PlayerRef AutoInt Property GreaterThanInt Auto Int Property LessThanInt Auto Event OnInit() if PlayerRef.GetAV ("Illusion > GreaterThanInt and Illusion < LessThanInt") Game.IncrementSkillBy("Illusion", 1) debug.messagebox("You learn about illusion") else debug.messagebox("You fail to learn anything new") endifEndEvent What Im trying to do is increase the players illusion skill if thier skill is between 2 numerical points Thank you in advance
IsharaMeradin Posted November 18, 2015 Posted November 18, 2015 Change if PlayerRef.GetAV ("Illusion > GreaterThanInt and Illusion < LessThanInt")to Int IllusionValue IllusionValue == PlayerRef.GetAV("Illusion") If (IllusionValue > GreaterThanInt) && (IllusionValue < LessThanInt) If the compiler complains about the INT thing, change all your values to FLOAT. Skill values may be stored as floats in order to display skill progress bar on the skills screen.
sLoPpYdOtBiGhOlE Posted November 18, 2015 Posted November 18, 2015 (edited) Also increment skill doesn't have a 2nd parameter. it just increases by 1.Scriptname zzz_illusionResearchScript extends activemagiceffect Int Property GreaterThanInt Auto Int Property LessThanInt Auto Event OnInit() Int i = Game.GetPlayer().GetAV("Illusion") As Int If i > GreaterThanInt && i < LessThanInt Game.IncrementSkill("Illusion") Debug.MessageBox("You learn about illusion") Else Debug.MessageBox("You fail to learn anything new") EndIf EndEvent Edited November 18, 2015 by sLoPpYdOtBiGhOlE
Deleted28154640User Posted November 18, 2015 Author Posted November 18, 2015 (edited) Thank you for the help Im going to try it out now :smile: Works perfectly thankyou so much Edited November 18, 2015 by Guest
Recommended Posts