I know, there are many posts on this subject, but i do not seem to get it.
I wonder if there is anyone who could show me, give me a lesson?
I think i will get it when i see it
Thanks
These forums are CLOSED. Please visit the new forums HERE
sit target again |
|
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
03-30-2007 03:00
I know, there are many posts on this subject, but i do not seem to get it.
I wonder if there is anyone who could show me, give me a lesson? I think i will get it when i see it Thanks |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-30-2007 03:42
I know, there are many posts on this subject, but i do not seem to get it. I wonder if there is anyone who could show me, give me a lesson? I think i will get it when i see it Thanks Which bit of it is giving trouble? Every Prim can have a sit target. It is the position (and rotation) at which an avatar will be positioned relative to the prim when they choose sit. By default it is ZERO_VECTOR and ZERO_ROTATION i.e. at the centre of the prim. A default sit target will inhibit the sit target related functionality, that is to say lllAvatarOnSitTarget will always return NULL_KEY if called. I'm not 100% sure and not able to get into SL to test, but I dont think a changed event will be triggered either. Anyone? The TP trick using sit targets is to place the sit target coordinates at the desired destination and then in the script unsit the avatar as soon as we detect that they have sat down. Its usual to include a slight delay (0.5 sec) before unsitting. This is to help prevent the avatar from being kicked of the prim to fast by the physic's engine. HtH |
|
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
|
03-30-2007 03:44
What is it that you don't understand? Allowing someone to sit in a specific position on an object or using it as a teleport?
Basically, every prim can have one sit target. That target is set relative to the center of the prim. If you have a 1m tall prim, and set the target to be 0.5m up, they will sit on the top of the prim. If you set the target to be <0,0,0> they will sit exactly in the center of the object. The target is controlled by a vector, which consists of the x,y and z values, and a rotation. If you edit the prim you are setting a sit target on, you will see 3 direction arrows in red, green and blue. Red for x, green for y, blue for z (iirc). The vector controls exactly where the avatar will sit, the rotation value will control which way they are facing. I don't have enough of a grasp on rotations to explain it, so I'll give you a link instead. http://rpgstats.com/wiki/index.php?title=Rotation Sit targets have a maximum range of 300m on any axis which is where their use as teleports comes from. Using the changed event that is triggered when someone sits on the target, we can then script in a small sleep (to allow them time to arrive) and unseat them at the destination. http://rpgstats.com/wiki/index.php?title=LlSitTarget Someone will probably be along to say that you can have more than one sit target, but it's never more than one at a time and it confuses matters for a (hopefully) simple explanation ![]() Edit: beaten to it. Guess I have to get up earlier ![]() |
|
Sys Slade
Registered User
Join date: 15 Feb 2007
Posts: 626
|
03-30-2007 03:57
A default sit target will inhibit the sit target related functionality, that is to say lllAvatarOnSitTarget will always return NULL_KEY if called. I'm not 100% sure and not able to get into SL to test, but I dont think a changed event will be triggered either. Anyone? Just tested using this code: CODE default{The changed event is triggered for both sit and unsit, but the key returned is always a null key. |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-30-2007 04:07
Edit: beaten to it. Guess I have to get up earlier ![]() LOL. mid morning here |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
thanks so far
03-30-2007 04:08
Thanks Sys and newgate for your help
But i still do not understand (and i not even blond) I now have the sit target system, but i can't get it to work I am still new at building and scripting is like chinese to me. I want my furniture to have a animation in it. I tried using the instructions with the system. but must be doing something wrong Poseballs is no problem, but i would like to make furniture without balls too |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-30-2007 04:23
Thanks Sys and newgate for your help But i still do not understand (and i not even blond) I now have the sit target system, but i can't get it to work I am still new at building and scripting is like chinese to me. I want my furniture to have a animation in it. I tried using the instructions with the system. but must be doing something wrong Poseballs is no problem, but i would like to make furniture without balls too Without knowing which system you mean its hard to help much. A basic poseball requires that you set a sit target and then start or stop an animation as the avatar sits on the prim. The thing is a poseball is just a prim, you should be able to take a working poseball and copy all of its contents directly into your furniture and have it all work exactly the same. What isnt happening? You need to request animation permissions to be able to override the default sit with your own animation. The following isnt tested but i think its about right CODE
oh and I'm blond-ish so there.... |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
thanks again
03-30-2007 04:32
I will will give it a try and let you know
Seems still complicated but i will get it one time Oh, and my boyfriend is blond too and he is also smart. maybe that's it and i have to turn blond to get it right |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-30-2007 04:34
I will will give it a try and let you know Seems still complicated but i will get it one time Oh, and my boyfriend is blond too and he is also smart. maybe that's it and i have to turn blond to get it right Hmmmm, what seems complicated about it? if you dont want to chnage the default animation then just use CODE
|
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
hi newgate
03-30-2007 04:45
well maybe not complicated to you, but if you have never worked with scripts it is.
I think i works this way thanks again |
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
03-30-2007 05:21
well maybe not complicated to you, but if you have never worked with scripts it is. I think i works this way thanks again My apologies I did not intend that comment to be insulting. I meant can you say what it is about it thats confusing you so that I can expand upon the description. When an Avatar sits or unsits from a prim (or object) a changed event will be raised. The change will be in this case be CHANGED_LINK. The script checks for this and then checks if an avatar is still sat on the prim usingllAvatarOnSitTarget. If there is an Avatar then they have just sat down. In order to override their default sit animation a request is made (PERMISSION_TRIGGER_ANIMATION) If they respond with yes the run_time_permissions event will be raised. Again the script checks to see its the expected permissions and if so stops the sit animation and starts the custon animation. |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
it works
03-30-2007 12:19
Hi,
I am not insulted at all , i know i have to learn a lot And i tested for a while and i am getting the hang of it still confusing at times, but you have been a great help thanks Newgate |
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
03-30-2007 17:29
Sara,
Which 'system' are you using? It seems to come with 'instructions'. Are you, by chance, using the "Sit Target Helper"? |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
Hi stirling
03-30-2007 19:17
yes stirling,
And i can't get to work. Must be doing something very wrong I am now working with a basic script, but would like to add animation Have tried to follow instructions but no results Feeling very stupid but can't get it to work |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
sorry sterling
03-30-2007 19:18
Wrote your name wrong.
See i can't read |
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
03-31-2007 06:52
Sara,
To be clear, there is a 'system' called, "SIT TARGET HELPER". If THAT is what you are using, the answer to your question is different. Can you copy and post the code you are using? Just copy it from the Script and Paste it in here. |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
no inventory
03-31-2007 09:57
Hi Sterling
Yes that is the system i want to use Can't give you anymore information yet SL is acting weird and my inventory is empty will get back to you tomorrow |
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
More Reading for you, Sara
04-01-2007 17:52
/54/6a/153963/1.html
/15/c7/153278/1.html /54/9f/173276/1.html However, the last thread offers a non-intuitive work around. Anybody know what's going on? |
|
Sara Bonetto
Registered User
Join date: 6 Feb 2007
Posts: 14
|
at last
04-02-2007 03:00
Hi Sterling,
I got it! Thank for the info This was the problem. Found in one of the treads you suggested "Make sure the default action for the object you are setting is not 'sit' .. it has to be touch grab for the setter to work. You can change it back to sit afterwards" Everything solved |
|
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
|
04-02-2007 21:52
Glad to help!![]() |