Jump to content
  • 0

How to create prim bullet target?


Kadaj Yoshikawa
 Share

You are about to reply to a thread that has been inactive for 4071 days.

Please take a moment to consider if this thread is worth bumping.

Question

Hello everyone! :)

I'm trying to create some combat training tools for me and my friends, however I'm finding some difficulties making up targets that will register hit with prim bullet based items (swords, guns etc). 

I wanted this object to change colour upon hit, and maybe with a hover text that registered last hit and total hits. Is anyone able to help me somehow? I'd be extremely grateful :) Thank you in advance!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Registering a hit is not difficult.  When you write a script for your target , you just include a collision_start event. That's automatically triggered when anything hits the object.  Follow the link to the wiki page that decribes the collision_start event.  That's not the tricky part of the project, though.  You don't simply want to know that a bullet hit the target.  You want to know where it hit, so that you know how many points to award.  For that, you'll need to use a llDetectedTouchST function and a bit of math.  Finally, changing color is a snap.  You just use a llSetColor function.   This is a nice, not too difficult challenge, but it will take you some time if you have never done any scripting in LSL.

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4071 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...