Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particles from a HUD?

Kalel Venkman
Citizen
Join date: 10 Mar 2006
Posts: 587
05-31-2006 08:47
Can prims in a hud emit particles? I want to simulate battle damage for a combat control HUD.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
05-31-2006 09:04
I haven't tried this myself but I understand that particle systems work on HUDs but are only visable to the person wearing the HUD.

Also, I remember hearing that particle systems in HUDs which target a key (i.e. avatar, object etc) emitted from the 0,0,0 position of the simulator, though I'd have to test to confirm this and perhaps it's been fixed already. Again these particles should only be visable to the wearer of the HUD.

I'm guessing this isn't the behaviour you are looking for and instead a seperate attachment should be used which listens on a high channel for a string from the HUD (i.e. "hit";). You could also check that the
CODE
llGetOwner() == llGetOwnerKey(llDetectedKey(0))
in the listen so that theres no possiblitity of detecting someone elses hit.
Ayrn Wake
Registered User
Join date: 7 Jan 2006
Posts: 39
05-31-2006 09:22
If you can make HUD emit particles, and if they do only appear for only the owner, I'm tempted to try and make a targetting system, like overlaying targets on a person (green for friendly, red for griefer). I've been looking for a way about doing this, this could be it. Just gotta wait for the grid to come back on now. Otherwise, I need to beg for functions that allow you to sense object and agent on-screen positions.
Kalel Venkman
Citizen
Join date: 10 Mar 2006
Posts: 587
06-08-2006 08:50
From: nand Nerd
I haven't tried this myself but I understand that particle systems work on HUDs but are only visable to the person wearing the HUD.

Also, I remember hearing that particle systems in HUDs which target a key (i.e. avatar, object etc) emitted from the 0,0,0 position of the simulator, though I'd have to test to confirm this and perhaps it's been fixed already. Again these particles should only be visable to the wearer of the HUD.

I'm guessing this isn't the behaviour you are looking for and instead a seperate attachment should be used which listens on a high channel for a string from the HUD (i.e. "hit";). You could also check that the
CODE
llGetOwner() == llGetOwnerKey(llDetectedKey(0))
in the listen so that theres no possiblitity of detecting someone elses hit.


Actually, it's PRECISELY the behavior I'm looking for. The goal is to add verisimilitude for the player, so it doesn't matter if nobody else sees it but the person wearing the HUD.
Kalel Venkman
Citizen
Join date: 10 Mar 2006
Posts: 587
Targetting overlays are possible
06-08-2006 08:54
From: Ayrn Wake
If you can make HUD emit particles, and if they do only appear for only the owner, I'm tempted to try and make a targetting system, like overlaying targets on a person (green for friendly, red for griefer). I've been looking for a way about doing this, this could be it. Just gotta wait for the grid to come back on now. Otherwise, I need to beg for functions that allow you to sense object and agent on-screen positions.


There's a freebie Chat Range HUD that labels av's with their range from the person wearing the HUD, and it reasonably accurately puts those labels over the av's, so a) it must be possible with the functions we have now, and b) it must be fairly easy to do.

One thing that's always bothered me is that if I want to target some avatar, I always wind up targetting their crotch. While this is entertaining, I'm usually hoping for a head shot or at least a torso shot..
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-08-2006 08:54
I tested particles on the HUD, but they didn't seem to appear at all. Did someone else get this to work?
Kalel Venkman
Citizen
Join date: 10 Mar 2006
Posts: 587
They don't?
06-08-2006 08:56
Drat.

Well, the next possibility is to have prims with textures that move to overlay the view of a tracked target - as mentioned above, this must be possible and is probably how the chat range HUD works, by putting a title over an invisiprim that contains the range to chat target information.

All you need is to put a crosshairs graphic on that prim, and you've got a targetting reticle.
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
06-08-2006 09:21
From: Kalel Venkman
One thing that's always bothered me is that if I want to target some avatar, I always wind up targetting their crotch. While this is entertaining, I'm usually hoping for a head shot or at least a torso shot..

Position of AV is likely in the centre of their bounding box which yes, winds up somehwhere in that area.

For head shot, you can probably utilize fact bounding box is notoriously off when it comes to 'real' dimensions of avatar -- if you add half of height of bounding box to avatar's position, it'll wind up somewhere around their eye level.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-08-2006 09:23
Have fun with the math for that. You'll have to compensate for the camera's zoom, focus, and position, if it's possible at all.
Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
06-08-2006 10:36
Particles emitted from a HUD are visibile at <0,0,0> of the sim :) (I don't know if I should cry or laugh...)
_____________________
"If Mel Gibson and other cyberspace writers are right, one day the entire internet will be like Second Life." -- geldonyetich
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-08-2006 10:48
I was suspecting something like that. Now, are they visible to everyone, or just you?
Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
06-08-2006 12:02
It seems only to me
_____________________
"If Mel Gibson and other cyberspace writers are right, one day the entire internet will be like Second Life." -- geldonyetich
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-08-2006 12:21
Excellent. Now we just need to set the age long enough and the particle big enough to be noticed. Hmmm...
Kokiri Saarinen
Quoted for truth
Join date: 7 Jan 2006
Posts: 44
06-12-2006 03:28
Hmmm, a very limited targetting HUD system could be made by setting the target key... Have a beam of particles fly from 0,0,0 to your target lol :D, if they are within 72m of the sim origin of course.