Tracking User actions in an area over time

Post » Thu Jun 21, 2012 8:36 am

I want to prevent the user from performing a certain action more than once within a 500-unit radius for, say, 24 hours. I have something that works but I'm worried about it since I'm kinda skirting the rules a bit.

What I'm currently doing is (after the user does the action once) creating a MISC object with no .nif model, then add the following script:

Event OnInit()
Utility.WaitGameTime(24)
Self.Delete()
endEvent

When the player attempts the action in question, I then use one of the GetNearest() functions to see if the invisible MISC item is nearby. If it is, I dont let him do that action. After 24 hours, the item self-destructs, allowing the user to perform the action one more time.

Is this the best way, or is there a better/safer method?

1) Is the timer I'm using "safe" ie not gonna crash down the line?
2) Is there a better object to use than a MISC (markers dont have scripts)?
3) Is it safe to display a 3d object that has no .nif?
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am

Return to V - Skyrim