|
Prismatica Palisades
Registered User
Join date: 22 Mar 2007
Posts: 14
|
06-10-2008 02:15
I'm a really beginner scripter, and I thinkI have parts to make this work, but my mind is boggling to find the correct orders and not sure how to look it all up.
The object I'm creating has an animation in it, and I have a script to make it load the first animation in the object when worn, but I want it to wait until a keyword is spoken only by the owner (get owner command) in chat. I also want it to stop using the animation with another word, much like "ao on" and "ao off". I know this uses if then statements. I just dont know how to reorder everything so it will work.
Any tips or anything?
Thanks, Prisma.
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
06-10-2008 02:41
In your listen event, first set the received message to all lowercase: msg = llToLower(msg); Then, do your IF tests: if (msg == "ao on"  { llStopAnimation(#1); llStartAnimation(#2); } else if (msg == "ao off"  { llStopAnimation(#2); llStartAnimation(#1); }
|
|
Prismatica Palisades
Registered User
Join date: 22 Mar 2007
Posts: 14
|
06-10-2008 02:50
its that simple? lol I was so over complicating it.
I was looking at my scripts other people wrote and they had written something about a key and it looked a lot more complicated than that with verifying if it was the owner giving the command or someone else, and something about if the message was something else to do something else, which involved a lot of code that seemed murky.
If someone else in the area, in this case says "ao on" will the object respond to other peoples commands even though they are not wearing and do not own the object without some sort of scripted test?
Is there any kind of listener required or does it in this case auto listen?
Just curious as I'm trying to learn what I can as I go with projects.
Thanks, Prismatica
|
|
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
|
06-10-2008 20:57
Use llGetOwner() in the llListen() function to only listen to the owner: llListen(<channel>, "", llGetOwner(), ""  ;
|