These forums are CLOSED. Please visit the new forums HERE
can a avatar be scripted to catch and throw a ball? |
|
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
|
05-08-2005 06:10
can a avatar be scripted to catch and throw a ball? and can a goal be scripted to register a score? I think it would be cool to have some kind of team sport in 2L. like "flying football" or something like that....maybe two teams of 4 with matching team uniforms....and stuff
|
Silvia Kraken
Registered User
Join date: 19 Mar 2005
Posts: 2
|
05-08-2005 06:17
Quidditch!
|
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
|
05-08-2005 09:16
No....Slidditch!.....
![]() |
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
|
05-08-2005 09:50
just think about it...the Dark Goths vs. the Rabid Furries....will the fur fly or will the goths see the light...lol....
|
Malachi Petunia
Gentle Miscreant
![]() Join date: 21 Sep 2003
Posts: 3,414
|
05-08-2005 09:54
There are a couple of approaches you might consider. First, an avatar can't be scripted to do much of anything, so you'll need an attachment of some sort. This could be burried in the guts of an avatar but for something like Slidditch, it would be more natural to have it in a glove or a lacrosse stick or what ever they use.
The ball would also have to be scripted and in communication with the receiving glove to find out where it should go (or if it should miss). The biggest problem I see implementing such a game would be player movement; that is, if the ball heads for my glove and I move, it will go to where my glove was. The ball can periodically retarget itself to compensate but you will get some very "unnatural" ball movement. I have some doubts about being able to track the destination rapidly enough to work, but I could very well be wrong. Useful components for making such a game would include: llShout() on a non-zero channel for glove/ball communications. llGetPos() for determining the positions of the glove and ball, llSetPos() for moving the ball iteratively (note well the 10m limit on llSetPos), llSensor() so the glove can find the ball (or vice-versa), llTakeControls() because the glove will have to act like a "gun" so you can launch the ball. Throw in some vector math and states and you will have covered most of LSL by the time this is done. It is an interesting project, though ambitious. I'd love to see it work and would be willing to help some if needed. I recommend against using "physics" unless you are a masochist and like seeing the ball fall to the ground a lot. Hope that helps. |
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
|
OK...maybe we can just hold on to the ball
05-08-2005 10:06
OK...maybe we can just hold on to the ball and fly to your goal....the other team can block you or grab the ball from you....my idea is to have the ball on a central post ...the first team member to grab the ball has it...then try to fly through one of two rings on the opposing side ...one ring is big and easy to get through (lower points) and the other ring is small but higher points.... what do you think? ....i have a lot of land that we can try this at...
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
05-08-2005 10:07
Yes you can. Have your ball attached to an avatar's hand and have that ball's script (when triggered by a left-click in mouselook mode) turn the ball attachment transparent, trigger a throw animation, and rez a (moving) copy of itself.
To "pick up" a ball, have the attachment ball look for collisions with the moving ball it rezzed. When a collision is detected, shout a die command (so the moving ball is derezzed), have the attachment ball trigger an animation (of the avatar picking up the ball), and make itself opaque (or its normal texture) again. You can experiment with the order each thing needs to happen in to get the right look out of it. ==Chris |
Aimee Weber
The one on the right
![]() Join date: 30 Jan 2004
Posts: 4,286
|
05-08-2005 10:21
You should also talk to Ben Linden. He made a game of catch that included the animations for throwing and catching.
_____________________
|
Water Rogers
Registered User
![]() Join date: 1 May 2003
Posts: 286
|
05-10-2005 17:22
Pete fats made a football where you can catch/throw a ball back and forth. Worked pretty well back then (v1.1).
--Water _____________________
For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein). |
Hiro Turnbull
Freelance Scripter
Join date: 20 Apr 2005
Posts: 24
|
lets work together
05-10-2005 20:44
Hi Zaid,
I already started making quidditch. I have thought through several of the problems you have talked about. IM in the game and maybe we can get together and make this game happen. |
Zaid Vox
Registered User
Join date: 9 Apr 2005
Posts: 66
|
yes...lets work together....
05-11-2005 06:03
Hi Zaid, I already started making quidditch. I have thought through several of the problems you have talked about. IM in the game and maybe we can get together and make this game happen. Hi Hiro.... go here to see some pic's of the game: /165/ee/45797/1.html i will be in world at 6pm eastern time today 5/11....Zaid |
Hiro Turnbull
Freelance Scripter
Join date: 20 Apr 2005
Posts: 24
|
Logging in
05-12-2005 09:07
Sorry I missed you Zaid. Logging in was hard yesterday and also I usually can't get onto the game until about 6:00 game time. I did manage to make some cool things. I really wish we could get together and talk about some of this stuff.
|