Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Making A "health" script for a game

Smiggy Pinkerton
Registered User
Join date: 16 Mar 2005
Posts: 4
03-24-2005 12:31
We are trying to make a script that displays current health above a Avs head for a game.

The problem is is the object we are using to put the script in. So far we have a sphere
with full transparency "worn" on the player. The problem is if the sphere is PHANTOM then the "hits" arent detected by the object, And if we make the object NON_PHANTOM then we are unable to shoot bullets from inside of it. This leads to confusion as to how we will be shooting and detecting for shots. Does anyone have some experience with this?

Smigs
Kali Dougall
Purple and Spikey
Join date: 5 Feb 2005
Posts: 98
03-24-2005 12:34
An implementation using llVolumeDetect might work for you.
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
buttlet rez position
03-25-2005 09:25
You may also want to adjust the rez position of the bullet, so it's further away from the sphere.

I was using one of the old Linden gun scripts and put it in something close to me and the bullet would collide with me as soon as it rez'd..oopsie.. I didn't mean to commit suicide really I didn't..
RyeDin Meiji
Reluctant Entrepeneur
Join date: 15 Mar 2005
Posts: 124
03-25-2005 10:50
I have a sphere that is phantom, that uses llVolumeDetect to detect collisions, and follows the owner around wherever he/she goes (keeping the AV in the center of the sphere.)

This means the sphere is not attached to the AV so it can take part in normal physics interactions for a phantom object (does not cause collision event but can detect them from other objects), and you can shoot from inside of it. It's important to note though, that a bullet rezzing will be detected as a collision, so a check will have to be placed to see if the collision is "friendly" or not before it deducts from your health meter.

When you rez the sphere it starts following you, if you touch it it will stop following. It will not follow across sim borders where building is not allowed (for instance the welcome area).

IM me in-game and I will get back to you when I log in -
Smigmee Pinkerton
Unlicensed Primologist
Join date: 1 Mar 2005
Posts: 42
thanks guys
03-28-2005 07:52
Thankfully we took in some new members and created a scripting team. I believe they are using the Volume detect right now. Thanks so much to you guys

And if anyone is curious what were working on
Check out

http://curseoftheburningsea.tk