Jump to content

Floating Text Multi Click Counter


Allison Lynagh
 Share

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

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

Recommended Posts

I'm still new to scripting, I've done a few basics, and at first this seemed basic, but not so much now. I've figured out a click counter, floating text is a breeze. My question here is.. how do you have a floating text counter for multiple parts?

IE A list of things in stock : Eggs -10  Milk -5 Cheeselogs -4

I'm sure I need a listen event in it to listen for each of those individual words, or a simple dialog menu to add/subtract from the "stock" so to speak, but I'm at a complete loss as far as how to get there. I ask here now after scouring and finding absolutely nothing like what I'm asking. 

Any help, suggestions, hints are more than appreciated!

Link to comment
Share on other sites

If you take the dialog example, you just find out which button has been pressed using llListFindList which will return the index at which the button that has been pressed in the list of buttons - e.g.:

list glButtons = ["Ham", "Eggs];

 You culd then keep a 2nd list of counters that starts:

list glCounters = [0,0];

 In the listener, you sumply increase the index at the same position as the button that has been pressed and increse the conters at this position by 1 and replace the old value by the new one:

integer index = llListFindList(glButtons, [message]);if (index != -1) {   glCounters = llReplaceList(glCounters, llList2Integer(glCounters, index) + 1, index, index);}

 I hpe this points you in the right direction

Link to comment
Share on other sites

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