Jump to content

Problem with scripting


renogaz

Recommended Posts

So basically my script its the next one

 

Scriptname xxxxx extends ObjectReference

{script xxxxxx}

 

float days

float days1

int count

 

Event OnActivate(ObjectReference akActionRef)

count = count+1

if count ==1

Debug.MessageBox("You found a xxxxxx")

else

Debug.MessageBox("You pick up xxxxx")

endif

days = Utility.GetCurrentGameTime()

Debug.MessageBox("xxxxx" + days)

RegisterForSingleUpdate(5)

 

endEvent

 

Event OnUpdate()

days1 = Utility.GetCurrentGameTime()

if days1 >= days + 3.000000

Debug.MessageBox("xxxxx")

UnregisterForUpdate()

else

RegisterForSingleUpdate(5)

endif

 

endEvent

 

 

What i want to do is when i pickup the x object, the days1 variable keeps running and the days variable stay static on the gametime when i picked it up, and after 3 ingame days display a message,

my problem is that when i get to 3 or more days after pickup i keep recieving the message, is there a way to make it so after days1 >= days + 3.000000 the Event OnUpdate stops?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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