Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Bong Toke Script, Help Needed!

Mevo Syaka
Ganja Guru
Join date: 12 Dec 2006
Posts: 33
01-25-2007 07:03
Hi all,
I was wondering if anyone could help me. I have made a bong and I want to be able to right click it and click "Toke!" which will then start my toking animation standing up. (Avatar bends over in animation.) I just can't seem to get it in the right position.

I hope I posted this in the correct forum and that I have given enough detail. All help is much appreciated.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
01-25-2007 07:08
So to clarify, you just need to get your sit target lined up properly for your animation?

There's a discussion thread nearby this one that has a freebie sit target calculator that I think you would find pretty helpful.
Mevo Syaka
Ganja Guru
Join date: 12 Dec 2006
Posts: 33
01-25-2007 07:17
Yes, basically. I will have another search.
The thing is I don't want to use a poseball, just right click on the bong and click "Toke!" instead of sit. I can override the default Sit text its just the positioning.

Thanks for the reply.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-25-2007 07:37
From: Mevo Syaka
Yes, basically. I will have another search.
The thing is I don't want to use a poseball, just right click on the bong and click "Toke!" instead of sit. I can override the default Sit text its just the positioning.

Thanks for the reply.


Basically you need to make your bong into a pose ball.
Change the sit text to 'Toke!' using llSetSitText (I think you already know this bit)

Add a changed event where you can request permission to animate the AV and play the correct animation. Search for llStartAnimation should give you the information you need.
Mevo Syaka
Ganja Guru
Join date: 12 Dec 2006
Posts: 33
01-25-2007 07:39
Thanks for the help, I got it sorted from the sit setter script.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
01-25-2007 07:55
From: Mevo Syaka
Yes, basically. I will have another search.
The thing is I don't want to use a poseball, just right click on the bong and click "Toke!" instead of sit. I can override the default Sit text its just the positioning.

Thanks for the reply.


Nobody should want to use poseballs, and it's good that you don't :)

The discussion thread:
/54/6a/153963/1.html

Is actually for a system that helps you calculate the sit target for the object you're building.

The poseball part is just what you use to help fix the position by moving your AV visibly where you want it to be. Once you've done that it will give you the sit target you would need to put in the script in the bong itself to replicate the location where you were on the poseball.
Mevo Syaka
Ganja Guru
Join date: 12 Dec 2006
Posts: 33
01-25-2007 07:55
Yea, thats exactly what I did. :D Pose balls are beginning to annoying me.

Two more question, how do I get the toking avatar to stand up automatically after toking using llUnSit? Also how would I get the avatar to have smoke particles coming from the mouth after they toked?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-25-2007 08:41
From: Mevo Syaka
Yea, thats exactly what I did. :D Pose balls are beginning to annoying me.

Two more question, how do I get the toking avatar to stand up automatically after toking using llUnSit? Also how would I get the avatar to have smoke particles coming from the mouth after they toked?



You will need to stop any custom animation thats running as well as using llUnSit.

Positioning particles to come from the AV's mouth would really require a prim attached to the mouth but you may be able to fake it with careful choice of the particle parameters.
Furia Freeloader
Furiously Furia
Join date: 13 Dec 2005
Posts: 34
01-25-2007 13:47
I'm surprised you didnt' do this as a scripted attachment. that way you can sit anywhere you like and save prims in your house.
Zaphod Kotobide
zOMGWTFPME!
Join date: 19 Oct 2006
Posts: 2,087
Bong Toke?
01-25-2007 19:34
I'm surprised you haven't offered to share... Sorry I realize I've contributed nothing useful to this thread. *retreats*