Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

bullet target by command

drexter Darling
Registered User
Join date: 14 Jun 2006
Posts: 1
02-13-2007 03:31
Ok so, I have an object called bullet, which is basically a fireball that is physical and when it hits someone or something, it stops, explodes, and does a little fire thingy like most fireballs... However I dont know how to make a script that will rez the bullet from my attachment and fire it At the exact target I tell it to in a command, also I have no idea how to do partial name commands stuff either =/.

Someone please help this noob =/
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
Read the wikki!
02-13-2007 05:12
From: drexter Darling
Ok so, I have an object called bullet, which is basically a fireball that is physical and when it hits someone or something, it stops, explodes, and does a little fire thingy like most fireballs... However I dont know how to make a script that will rez the bullet from my attachment and fire it At the exact target I tell it to in a command, also I have no idea how to do partial name commands stuff either =/.

Someone please help this noob =/


I'd suggest you start by reading the wikki, not the new one, grab a copy of Osgeld's mirror

Rezzing an object : use llRezObject(string name, vector pos, vector vel, rotation rot, integer param)

You can either fire it off directly using its velocity (vel) or pass it a channel number and then tell it where to aim.

The partial name stuff isn't that difficult.
Get the text from the user via chat.
Start a sensor looking for for all Avatars
When you get back a list check for a match against the first part of each ones name using
llGetSubString

An Alternative would be to have a sensor that populates a list of buttons on a dialog so you dont have to type anything apart from /fireball to start it off. Or even make a HUD....

NOTE : All of the above have been covered previously in this forum a number of times.
Try here