|
Everett Streeter
Registered User
Join date: 28 Apr 2007
Posts: 20
|
03-27-2008 20:07
So I have been scripting and building away in Second Life and learning a lot. I have yet to use HUDs. Is there a good place to look for information on making HUDs, how they work, etc., or better yet, some good open source HUDs, since I learn best by "reverse engineering." Many thanks,
Everett
|
|
Azwaldo Villota
Registered User
Join date: 10 Feb 2007
Posts: 7
|
HUD design
03-28-2008 05:17
If you have a HUD, rezz it on the ground to have a look at the design. Some rotate after activation, and you will see all sides of the object when rezzed on the ground. Most HUDs appear to be a linked set, of some number of prims, all communicating with each other - likely with llMessageLinked fxns. There is a good open source HUD described at this page and also at this page , do not know if that offer is still valid. HTH
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
03-28-2008 07:52
HUDs are, in essence, simply objects that are attached to a HUD attachment-point on the avatar.
Some important notes on HUDs:
--If you have buttons on your HUD, you'll want to be sure to set llPassTouches(FALSE) for each button prim's script, or all touches will act as if the root-prim had been touched.
--Use llMessageLinked() efficiently, as interactive HUDs can quickly be filled with messages back and forth between HUD pieces.
--HUDs will not do some things normal attachments will...like detect moving_start or moving_end or apply Force or Impulse to an avatar. Think of the HUD more as a UI object than an 'in-world' attachment and you should be fine here.
Other than that...a HUD is a scripted object.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
03-28-2008 09:01
Another important note.. if your HUD is a simple "say" hud... then ignore what Kenn said about llPassTouches... Here's why. This has GOT to be the awesomest "quick HUD" script in existence. I can't take credit for the idea.. but here goes. integer hudchan = 0; // for testing purposes
default { touch_start(integer num_detected) { llSay(hudchan, llGetLinkName(llDetectedLinkNumber(0))); } }
Yes, that's REALLY IT! Put that ONE SCRIPT in the "core" prim of your HUD.. and I swear to you, ONE SCRIPT can handle 254 buttons! What this does... say you want a button to say "on".. simple, make a prim button that is named "on".. need one to say "resize?"... how about "delete" or ""pause"... Anything you might have a customer type on a channel, a HUD can do for you! Tired of customers complaining that the whole "/33 start" is too annoying to remember? Make them a handy HUD! Just remember that: llListen(hudchan, "", llGetOwner, ""  ; WON'T WORK for this. You've got to have a more=open listen, with a "filter" in the listen.. something like: if(llGetOwnerKey(id) != llGetOwner) return;
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
03-28-2008 10:30
From: Kenn Nilsson HUDs will not do some things normal attachments will...like detect moving_start or moving_end or apply Force or Impulse to an avatar. Think of the HUD more as a UI object than an 'in-world' attachment and you should be fine here. Hmm. Don't know about the moving_start and moving_end, but I believe you can still apply forces and impulses from a HUD attachment just fine.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
03-28-2008 16:44
From: Hewee Zetkin Hmm. Don't know about the moving_start and moving_end, but I believe you can still apply forces and impulses from a HUD attachment just fine. You can, but root prim only.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|