Jump to content

Single Use Item?


WinstonEverlast
 Share

You are about to reply to a thread that has been inactive for 1461 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I am new to scripting and trying to work things out but need some direction. I am scripting a LSD trip (basically a HUD that has moving textures, starts when you attach it and ends after a period of time). I've been able to figure out everything I need except for how to make it a "single use" object, so that the user can only wear it one time and it can't be used again. I've done some searches but haven't found anything, which tells me I'm likely looking up the wrong thing.

Could someone point me in the right direction?

Link to comment
Share on other sites

My personal method, which completely prevents any possible re-use is to have "used" (as per @Wulfie Reanimator's example) start as true, and switch to false if during state_entry() the owner of the object is "you".

This makes the script reset proof and you don't even need to set the object as no-mod as long as the script is no-copy no-mod. If they try to reset it, the item will simply become "used"

Link to comment
Share on other sites

I've used state changes for that. Set the item to be given in a state called "unused" and does it things and then does a reset script at the end and the default state handles any "I can't be used anymore" messages and actions on the attach handlers and state entry.  set the script to nocoy and voila.  :)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1461 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...