Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

magic attack

Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
10-20-2005 03:21
Guys,
I am trying to build a magic attack for a game and need a little help.

these are my current problems
1. making an object go to and hit another player based on player name
2. detecting when the object collides with the player and also detecting when it collodes with soemthing other than the player.

making it go from point to point seems easy and detecting a collision and distorying the object is easy but i have no idea how to find a players location by name and how to detect when i have collided with that player. i guess if i can find the players position when i collide i can check the players current position and if it matches my collision location i know i have hit but i still need to be able to ge the players position by player name.

thansk guys i am sure atleast one of you knwo the answer and that is is probably really easy but it has me stumped
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-20-2005 03:31
http://secondlife.com/badgeo/wakka.php?wakka=llSensor

Put their name into the first argument and NULL_KEY or "" into the second. Then use http://secondlife.com/badgeo/wakka.php?wakka=llDetectedPos in the sensor event.
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
10-20-2005 16:59
Eloise thanks for the info that is exactly what i am looking for.
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
10-22-2005 18:50
is there a easy way to make sure my object is always pointing in the correct direction? my object is a cone and i would like the tip to be always pointing towards its target if at all possible. this is very important during movement as well.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-23-2005 10:48
not until tomorrow. attachments in 1.7 will move...
Ushuaia Tokugawa
Nobody of Consequence
Join date: 22 Mar 2005
Posts: 268
10-23-2005 10:55
If I'm reading you correctly you mean you want the projectile to face the target (not the attachment)?

If this is the case, use llLookAt to easily point the up z axis towards your target (perfect for use with a cone).
_____________________
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
10-23-2005 15:45
Thanks guys. One more questions. With the new release will there be a way to offer the user a new user interface apart from text based or dialog based? I would really love to have a better way for them to quickly select a spell and target but currently text or dialog is the only way i can find.
Judah Jimador
Registered User
Join date: 13 Mar 2005
Posts: 230
10-23-2005 16:09
Heya, Seer,

Tomorrow's upgrade marks the Dawn of the Heads-Up Display...attachment points that sit at "windshield" Point-of-view, right inside your monitor, and are visible only to the person wearing them.

An ambitious scripter like you is going to go nuts with them :p

-- jj
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
10-23-2005 23:22
Do you happen to know where i can get further information on it? I know there are relase notes but they are a little lacking in details
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-24-2005 07:46
The preview grid and playing, or wait 5 hours and see what's around then...