|
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
|
02-02-2004 01:20
llDialog really should have an event, and better definition.
I don't want chat spew as a result of pressing a button. I want an event (returning the button index pressed) so I can specifically control various routines/functions off a particular button press. A chat spew event off llDialog makes this function incredibly limited, bordering on crippled.
A definable list containing the text shown on a button's face. Allow more than 4 buttons! The pop-up dialog would just dynamically create the buttons as needed and scale appropriately.
list Dialog = [Button0_Text, Button1_Text, Button2_Text, Button3_Text, Button4_Text,etc...]
Function call would simply point to the list, and create a header for the pop-up dialog.
llDialog(List_src, "Header String Spew");
An event would simply return the value of the button pressed. Allowing us to do anything from that point. We can chat spew, we can link message, we can give object, die, blow up, etc etc...
dialog(integer Button_Index_Number_Pressed)
Bos
|
|
Mark Busch
DarkLife Developer
Join date: 8 Apr 2003
Posts: 442
|
02-02-2004 03:07
I don't see why chat is more limited then another event. Care to explain?
|
|
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
|
02-02-2004 06:31
Limiting the output of a button press to *only chat* (even "high" channels) is very limiting to potential uses for buttons. For example, my pool table. The cue sticks (owned by players) could definitely use llDialog to make operating them easier. But i won't use llDialog() because it uses chat spew which is heard by any and all sticks within listening range. ex: Joe clicks his button to aim his stick, his cue stick says "aim here..." and Joe, Fred, Wilber, and Stevie's cue sticks all aim there. Meanwhile on the next table over Sally just clicked SHOOT, Joe, Fred, Wilber, and Stevie's sticks mystically shoots as well... :p Sure I can code in specifics to the string, such as passing the player's key (via a string), then check that.. but ugh that's a mess. If buttons fired an event, as I've shown above, I could do SO many things with very little effort all within the original script that called llDialog() function -- including spewing strings out to chat. How many scripts will listen to themselves on chat channels? :p With my suggestion an event would be used to find the button pressed. Joe presses the Aim button (say it's "button1"). dialog(integer button) { if (button == 0) { //do stuff for button0 } else if (button == 1) { AimStick(); //call aiming function } else if (button == 2) { // do stuff for button2 } // etc etc etc }
Simple, and a lot more powerful/flexible than llDialog() is currently. Bos
|
|
Cienna Rand
Inside Joke
Join date: 20 Sep 2003
Posts: 489
|
02-02-2004 07:27
I have an off-again on-again project to create a multiple choice quiz game using llDialog. In order to limit chat parsing between the user and their "buzzer" I'm just having it use a random channel initialized when they start play. with a full integer worth collision should be fairly low.
I assume the sticks are attached or owned by the users? You could always make each cue stick only respond to whoever it's attached to, or the owner.
|
|
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
|
02-02-2004 08:04
Chat returned by llDialog originates as if the person who clicked the button said it. In other words if Sally clicked shoot then the id and the name of the listen event: listen(integer chan, string name, key id, string mes) Would both match Sally. There is no extra workaround required. Check if (id == llGetOwner()) and you are set. In other words clicking a dialog button is the exact same as saying what the dialog button says on the channel used for the dialog event. Oh and chat is always centered on, emenates from, the object with the script not the AV. And you are wrong about your method being more flexible.  I am currently using some dynamic button names that actually pass some data around from the message call. I could never do that with your method. I do agree there should be more than 4 buttons though.
_____________________
-- 010000010110110101100001001000000100111101101101011001010110011101100001 --
|
|
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
|
02-02-2004 15:49
From: someone Chat returned by llDialog originates as if the person who clicked the button said it.
In other words if Sally clicked shoot then the id and the name of the listen event: listen(integer chan, string name, key id, string mes) Oooh I was unaware of this! Fantastic then, I thought it was the object's key/name returned was the object's. I stand corrected, and happy. Bos
|
|
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
|
02-04-2004 11:42
Hmm.. This could be fun =)
|