Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Probably a slightly noobish question >.>

Trinity Olchowy
Registered User
Join date: 30 Dec 2007
Posts: 2
02-05-2008 14:57
Howdy, I'm just a bit new at scripting and I'm needing a bit of help when it comes to projectile type objects. I'm able to make an object and push it forward directly infront of me a ways but I need a way to "fire" objects so that are side by side.

Also...and this is the biggest noobish question I think I can ask, but how do you make an object physical but not be effected by gravity ^^; thanks and please be nice to me...
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-05-2008 19:00
llSetBuoyancy( 1.0 ) will cause an object to float (not sure how it affects inertia, make sure you include an llDie clause, or make the object temp on rez (prefered)

be warned this function continually uses energy, so you may not have as much as you expect to process other script functions, the more mass the object the more energy used. so make objects hollow if possible.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Trinity Olchowy
Registered User
Join date: 30 Dec 2007
Posts: 2
02-05-2008 20:54
Thank you thank you...that's one question down ^^; and thanks for being nice to me.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-05-2008 21:12
you're welcome, I can't speak for anyone else here...but I don't bite...strangers....
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-05-2008 21:49
"Side by side" probably means you are going to want to give them the same vector velocity, and presumably displace them a little from each other in a direction perpendicular to that velocity. So, for example, if you are firing in the local x direction, you'll probably want to give each a velocity in the local x direction, and displace some of them in the plus or minus y direction (local).

It can be tricky to fire them all off at once though, since each rez causes some script delay. Possibly you could rez them all with zero velocity instead, and tell them all to "go" (give themselves impulses with llApplyImpulse(), for example) at once instead. That or use several scripts to rez projectiles all at once. Or maybe take them all into inventory as one inventory item (shift-click them all in edit mode and then take), though I think then the rez parameters (like position and velocity) apply to them each individually, so you might have to have them start out phantom and displace themselves a little before going solid or something.