|
jazz Spatula
jazz spatula
Join date: 7 Feb 2006
Posts: 11
|
05-08-2006 22:31
Hello everyone!
I need to make a script for a voting machine. The deal:
1. I want a script in a box to register the votes of the people, so everyone can click in the pie menu ( maybe... i don't know if is the best idea) and increase one vote. I thought in use 11Sittarget to create a buttom named vote. Thiss vote appear like a variable (integer vote) that increase with each vote (++vote) 2. With each vote the box make bigger its size 3. Maybe using 11DetectedKey I can register the people so each person only can vote one time..
Please help me.... I am lose with this!
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
05-09-2006 06:45
1. Yes, have a global variable "votes", and then increment that with each vote. Use llSetTouchText() to change it from "Touch" to something like "Vote".
2. Something like llSetScale( <1,1,1> * llPow( votes, 1.0/3.0 ); (Scale it up so that the volume of the cube is proportional to the number of votes. The llPow() is a cube root).
3. Have fun with that, with 16kb of memory and no decent memory controls. Although, you may be able to almost pull it off with strings, and cycling. So, the string could hold, say, 100 keys, "key1_key2_key3_key4", and then you would do llGetSubString to find if a key was already used. After a while, you would start dropping off the oldest keys, so you don't overflow memory.
4. GOTO 1
|