Can I do like llUnsitTarget?
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-24-2005 21:57
Hello there,
I made a script that an avatar sat on the object for a while and stood up. But the avatar stood up just on the object when I used llUnsit(llAvatarOnSitTarget()). I hated it. You should stand up on ground when you stand up from a chair, not on the chair. Can I decide to locate to stand up?
Thanks.
_____________________
 Seagel Neville 
|
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
|
06-24-2005 22:59
No, but you can llPushObject() the avatar with a light impulse.
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
06-24-2005 23:22
Alternately, you can phantom the chair when they get up with llSetStatus(STATUS_PHANTOM_TRUE); This would make them appear to stand on the ground when they get up.
_____________________
---
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-24-2005 23:47
Thank you Huns and Jeffrey, I will try both. 
_____________________
 Seagel Neville 
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
I'm a dumb scripter... 
06-25-2005 02:03
Huns, help. There is no example of llPushObject() in Wiki. I don't know how much value I should put in vector impulse and vector angular_impulse. Trying to put <0, -10, 10>, it didn't work at all. And id section, can I use llAvatarOnSitTarget() in it? I think it is available when I use llSitTarget. So do I have to put it before llUnsit()? Trying to put both by turns, it worked just llUnsit(). Furthermore, I found someone's comment in Wiki, "I can't get this function to work on an avatar". Clarify this plz. Jeffrey, I tried llSetStatus(STATUS_PHANTOM ,TRUE); and surly it stands on the ground, but through the chair! 
_____________________
 Seagel Neville 
|
Lightwave Valkyrie
Registered User
Join date: 30 Jan 2004
Posts: 666
|
06-25-2005 20:16
pushobject is used in vehicle scripts when someone tries to steal your car  some thing like this: llUnSit(agent); llPushObject(agent, <1,0,0>, ZERO_VECTOR, FALSE);
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-26-2005 03:13
Hiya Lightwave, Thank you so much. I realized I didn't understand and made a mistake about that False and True. I made reference to a vehicle script and I got how much value I should input in impulse. llPushObject(agent, <-100,0,100>, ZERO_VECTOR, FALSE); This works well for mine. And I assign the key beforehand, like key agent = llAvatarOnSitTarget(); It also works.  Thank you for this suggesting.
_____________________
 Seagel Neville 
|
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
|
06-26-2005 12:13
The angular impulse is to put spin onto the pushed object, which you don't want here.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
06-27-2005 09:45
I've had problems in the past with players standing up from an object and ending up hopelessly embedded in the object. I tried numerous methods such as pushing them when they stand up, phantoming the table when they stand up, and phantoming then pushing. I tried pushing straight up and pushing outward.
What it comes down to is that the system is just too inconsistent to make any good solution feasible. It's difficult to tell whether any person will get stuck when they get up, because this depends on their size, the rotation of the object, and whether or not the sim is feeling cranky. It's also difficult to guage the right kind of push, due to the exponential fall-off of llPushObject(). I had the same push values send me rocketing into the sky and barely tap me. It was pretty much impossible to script in a push value that was simultaneously strong enough to get them out of the object before it unphantomed and weak enough not to send them flying across the sim in some cases, depending on how the sim felt that second.
My final solution was to just phantom the object for 10 seconds and let the player deal with getting out themselves.
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-28-2005 21:07
Zindorf and Lex, thanks for more information. I realized that it depended on each Avatar's size how much value I should input in impulse as Lex said and 100 value was so big as much as you would blow by 100 meters. But I wonder why 100 value worked fine for my object, which was just a cushion type seat. There shouldn't be any object to disturb to blow. I guess unsitting animation could disturb it. llUnSit(agent); llSleep(0.5) // wait for ending animation llPushObject(agent, <0,-100,100>, ZERO_VECTOR, FALSE); I will try above after coming home. BTW, From: Lex Neva My final solution was to just phantom the object for 10 seconds and let the player deal with getting out themselves. Don't you think it is awful to see someone falls into the object?
_____________________
 Seagel Neville 
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-29-2005 06:20
Yay, it was exactly what I thought. But it was poor that I hopped after standing on the cushion first. Although it is a buggy solution, I prefer 100 value. And, if you change rotation of the object, you should write like below. llPushObject(agent, <1, 0, 0> * llGetLocalRot(), ZERO_VECTOR, FALSE);  Oh, I wrote, "I guess unsitting animation could disturb it". It was not correct. It did not just finish sitting animation until llUnsit was fired and an AV stood up. It took time a bit.
_____________________
 Seagel Neville 
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
06-29-2005 08:11
From: Seagel Neville BTW,Don't you think it is awful to see someone falls into the object?
Yes, it looks bad to have people "swimming" in the object after they stand up, but it was really the only consistent solution I could come up with. No matter how much compensation I did for the avatar's mass, distance, and the alignment of the stars, I just couldn't come up with any kind of push that was consistent. Every push value I tried occasionally sent me into orbit and also often simply failed to push me at all.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
06-29-2005 17:18
Another alternative is bake some movement into the animation so when the use sits they are really infront of the chair not actualy on it.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
06-29-2005 21:56
 Strife, you can say that again!
_____________________
 Seagel Neville 
|
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
|
07-06-2005 11:13
From: Strife Onizuka Another alternative is bake some movement into the animation so when the use sits they are really infront of the chair not actualy on it. THATS IT! I ran into this issue with my airship - It's allll linked objects so making it phantom means that the person begins plummeting to the ground. I finally settled on a SLIGHT impulse up (because the physics system would make them also fall through the floor and plummet to the ground if the vehicle was moving at ALL, even moving very very slow, while passengers stood up...), and still ended up with them standing up and occasionally standing on top of the chair... Yes, it's very touchy and sporadic - ALL of the best problems in SL, and ANY problems that even THINK about dealing with physics, are. ;P But Strife, I'm very glad you mentioned that, actually having them sit slightly above and in front of the seat and then making the sit-animation compensate for this seems like a much cleaner way to do these sort of things.
|