|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-09-2005 15:50
Guys, I am only new to scripting but i am trying to create an object that has 10 buttons and 5 counters. The idea is that there will be a deposit button a counter for the number of items deposited and another button to withdraw an item. This would be repeated 5 times to allow the object to store 5 different objects.
Is there are way to do a button using the touch even that does not require a prim per button? is there a way to get the position of the touch event?
also is their a way to display the 5 counters and update the number via script. I would prefer not to limit the possible values of the number if at all possible.
While i would love to do this with just one prim and some textures/images i don't think this is possible but i hope you guys may have some ideas of what i can do to reduce the prims.
Seer
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
10-09-2005 18:27
You can display the counters using floating text above the prim. llSetText().
For the buttons, there is currently no way to perfectly detect a mouse click within a prim face. However, you have an option since you only need two buttons. You can temp_rez the buttons as needed.
Suppose the original single prim is clickable, maybe it has a start button as part of the texture. A user clicks that button, and two prims rez set to temp_on_rez (the user would have about 1-minute to click the buttons before they go away.) The buttons would communicate to the original prim via private chat channel that would only be open while the temp buttons exist. Whenever one of the temp buttons is clicked or other interaction takes place, llDie() both buttons, then re-rez them as to provide another minute or so before the temp_on_rez time-out strikes.
That's my best suggestion.
|
|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-09-2005 19:12
DoteDote thanks for the suggestion. I will try to test your suggestion tonight and see if i can get it to function correctly.
Would you know where i could find any sample code for something similar to what you suggest? if not i will work it out but examples always make things a little easier.
Seer
|
|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-09-2005 23:17
The method you suggested for displaying the text would put the text above the prim not somewhere on it correct? I need the text on the prim. I have seen some guys talking about a script that can turn 1 prim into 3 or 6 characters. So far that has been the only thing i can find for putting text on the prim itself.
There will be 5 counters and i want them on the surface of the prim not above it. It would need to support 3-4 digits.
If you can thing of a better way to do it that would eb great as this method is meant to be a little slow due to textures required.
|
|
Moonshine Herbst
none
Join date: 19 Jun 2004
Posts: 483
|
10-09-2005 23:40
Search the forums for XYText to find the text-on-prim script. I think you can find a 3 chars per prim, 1 texture version. There is also a 6 chars per prim version, using multiple textures, but they take a little time to load for the user.
|
|
Rodrick Harrington
Registered User
Join date: 9 Jul 2005
Posts: 150
|
10-09-2005 23:54
|
|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-17-2005 15:45
thanks for all the info guys. I have got what i wanted to work
|