Jump to content
  • 0

How can i detect if item is worn?


naughtyniece
 Share

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

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

Question

Hi

I have 6 items in 6 seprate #RLV folders called item1, item2, item3 etc.

I have a button on a hud, when pressed it @attachover item1 currently.

However i want to detect if item1 is attached to my avatar, and if so @attachover item2, if item2 is attached then @attachover item3 etc up to item6 which is the last item that an be attached.

Can this be done please?

Thanks

Suzie Q

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I think you need to start with @getinvworn, which you use to Get the list of shared folders in the avatar's inventory, with information about worn items.

You will then need to loop through the results in some way, to work out which the next item to attach is.   I can think of a couple of ways to do that, but I'd need to play with it a bit -- if I were makng it, that is -- to decide how best to do it.

If you can't work it out (and, at first sight, it looks a bit tricky) then probably best to ask follow-up questions in the Scripting forum.   Several of us there are familiar with RLV, and more of us are familiar with list handling (which is the difficult part of RLV, I think).

ETA:   If the circumstances in which the item are to be used will permit it, it might be simplest to maintain an index in the script telling you how many items you've already attached, and use that to decide which the next folder is.   I don't know what you're doing, though, so maybe that wouldn't work for you.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3258 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...