Johnathan Padar
Registered User
Join date: 27 Jul 2005
Posts: 23
|
01-28-2006 16:41
i have been struggling with trying to make a color changing light with a button for several days now, and little and no luck. I tried finding a vending machine for the button..didn't find one, looked at severaly elevators i have, that didn't help either...even looked at a door and lock, but the script wasn't viewable... i don't know much about scripts...but have edited several to fit my needs in objects. so i know a little =) i bought a color changing script and tried to edit and use the basic hello avitar script so that it might work on the light by typing (llsay /1 light color) but no luck with that either. am i going about this all wrong and need knowlege with strings for this? i have no clue now as how to make my lights work..help please...
|
Wood Golem
Registered User
Join date: 27 Jan 2006
Posts: 22
|
01-28-2006 17:47
buttons are touch events in the hello world you would put your functions (what the script is suposta do) after touch start and between the {}
/# command are done with the listen event, you first have to tell the script to listen with llListen(); then later on you can define whats gonna happen when someone says something. Most of it is what channel its on /99 for example and some if else clauses to respond to commands you setup
listen(integer channel, string name, key id, string message) { if (message == go) { llDoStuff(flags,data,ect); } else if (name == llGetOwner()) { llDoOtherStuff(data,range,ect) } }
llDialog is probally what your looking for, it brings up a little blue box in the upper right hand of the UI with different options on upto 12 buttons
It relies on the listen event, all it does is give a clean pushbutton ui, so instead of saying /495 blue you click the button labeled blue and it will say /495 blue for the user
you would setup a listen like normal and the listen event for your uses, use touch start or something to get the users UUID and start the dialog with them
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
01-28-2006 17:49
Welcome to the forums! IM me in world sometime so we can talk about what you actually want and I'll happily talk you through it no one else will sooner - it's 1:50 am here and I'm off to bed. The wiki http://secondlife.com/badgeo/wakka.php?wakka=HomePage is also your friend potentially - look at the communications and textures sets.
|