Help amending a script

Post » Mon Dec 10, 2012 7:34 am

Have a small script that counts pearls. When the Global hits 3 quest progresses, this all works fine except a friend of mine was just testing out the quest and she has an alchemy perk that means she gets 2 pearls instead of 1. She collected 6 pearls in all and the quest was stuck. The script needs a IF that says if the pearls count =3 or more....I have tried but can't seem to get it to work.

Scriptname ELSpearlCountScript extends ObjectReference
GlobalVariable property GlobalCount auto
Quest property myQuest auto
Ingredient property Obj auto
Int property preReqStage auto
Int property StageToSet auto
int myCount
Auto State Ready
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
if myQuest.GetStage() == preReqStage
if akNewContainer == Game.GetPlayer()
utility.wait(0.10)
myCount = Game.GetPlayer().GetItemCount(Obj)
GlobalCount.SetValue(myCount)
if myCount == 3
myQuest.SetStage(StageToSet)
endif
GoToState("Picked")
endif
endif
EndEvent
EndState
State Picked
EndState
User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Sun Dec 09, 2012 10:56 pm

if myCount >= 3

That's the syntax. if myCount is greater-than-or-equal-to 3 -------> do stuff.
User avatar
steve brewin
 
Posts: 3411
Joined: Thu Jun 21, 2007 7:17 am


Return to V - Skyrim