These forums are CLOSED. Please visit the new forums HERE
If you're sitting somewhere ... |
|
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-02-2005 09:42
Okay. I'm making a script that changes the color of three of the prims on a vehicle I'm making, and the actual vehicle script (a free "Motorcycle" script someone gave me that I've modified slightly) isn't on one of the scripts with the color change. You get it to change by saying "/color (name of color)", and the problem is, I can't for the life of me figure out how to make it only work if you're driving it. Anyone got any suggestions?
|
Kali Dougall
Purple and Spikey
![]() Join date: 5 Feb 2005
Posts: 98
|
04-02-2005 10:05
As a vehicle, it probably has a llSitTarget call somewhere, right? If not, add this in default state_entry:
CODE llSitTarget(<0, 0, 0.001>, ZERO_ROTATION);Then look here for the answer to your question: http://secondlife.com/badgeo/wakka.php?wakka=llAvatarOnSitTarget |
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-02-2005 12:25
Okay ... hmm ... is there any variable or whatever to call if you want to know the name of who's riding it, or something? (So I can filter the name in the llListen() statement)
EDIT: Okay, I put: CODE if (change & CHANGED_LINK) { before the listen() bit and } } after it, but that doesn't seem to work ... |
Cross Lament
Loose-brained Vixen
![]() Join date: 20 Mar 2004
Posts: 1,115
|
04-02-2005 12:43
The following will return a string containing the name of the avatar sitting on the scripted object.
CODE string sitter = llKey2Name( llAvatarOnSitTarget() ) ;llAvatarOnSitTarget() will return NULL_KEY if nobody's sitting on the object. ![]() _____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |
Zuzi Martinez
goth dachshund
![]() Join date: 4 Sep 2004
Posts: 1,860
|
04-02-2005 12:45
might want to make it so it only listens when somebody's sitting on it and turns the listen off when they get up. since you want it to work only when somebody's on it there's no sense having it listen when they're not on it.
_____________________
Zuzi Martinez: if Jeska was Canadian would she be from Jeskatchewan? that question keeps me up at nite.
Jeska Linden: That is by far the weirdest question I've ever seen. |
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-02-2005 12:48
Okay ... can strings and whatnot pass through different script items in different prims on the same object? And Zuzi, that's kinda what I'm trying to do. n.n;
|
Jeffrey Gomez
Cubed™
![]() Join date: 11 Jun 2004
Posts: 3,522
|
04-02-2005 13:01
Okay ... can strings and whatnot pass through different script items in different prims on the same object? And Zuzi, that's kinda what I'm trying to do. n.n; Yes. Use link messages. Here's a modified version of code with a dynamic listener and llDialog. It's just a simplified version of my single-prim media script: CODE integer g_listener = FALSE; // Listen Handler _____________________
---
|
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-19-2005 12:24
Hmm ... how do you detect what an object's link number is?
|
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-19-2005 12:33
Okay ... how do you send a link message between different prims linked to the same object?
|
Jeffrey Gomez
Cubed™
![]() Join date: 11 Jun 2004
Posts: 3,522
|
04-19-2005 12:49
Use their link number.
_____________________
---
|
Tizzy Calliope
Mew!
Join date: 27 Feb 2005
Posts: 38
|
04-20-2005 12:06
Ah, figured it out! ^^
|
Rayve Mendicant
Scripts for L$5 billion
Join date: 12 Mar 2005
Posts: 90
|
04-20-2005 16:58
Okay ... can strings and whatnot pass through different script items in different prims on the same object? I wish...A global variable at this level would be quite relieving. Well, more likely for single prims, but I certainly wouldnt' mind. =D Wouldn't necessarily make the code itself more efficient, but would make the CODER so ![]() |