HUD Creation
|
|
Brandi Lane
Registered User
Join date: 2 Apr 2007
Posts: 157
|
04-03-2007 10:32
Hi everyone:
I'm trying to make a simple HUD to clean up my screen. All I really want is a tiny HUD that can play various animations for me (think dances) and optionally turn my AO on/off. What would be really helpful is any kind of HUD tutorial that shows the basics of the classic "Hello World" type hud.
I suppose, as a secondary question, can a HUD I create run animations that are not dropped into the HUD, just in my inventory?
Thanks in advance for any help. ~B
|
|
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
|
04-03-2007 10:41
I had the same problem than you until i figured out a HUD is nothing more than an object you will attach to your view, just make a basic cube with a basic Hello World script into it when touched and you ll get your first HUD. The default script does something similar.
For the animations, you need to have these dropped into it or be the default ones, maybe you could use a server too i haven't really looked at it.
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
04-03-2007 10:48
From: Brandi Lane I'm trying to make a simple HUD to clean up my screen. All I really want is a tiny HUD that can play various animations for me (think dances) and optionally turn my AO on/off. What would be really helpful is any kind of HUD tutorial that shows the basics of the classic "Hello World" type hud. Sadly, there aren't any real in-depth tutorials for HUD-building that I know of. However, all a HUD is is a prim object attachment (like hair or shoes) attached to the screen instead of to your body. It works pretty much the same. Put in touch_start() events in the prims, and put whatever functionality you want in them, and voila! Instant HUD. If you have another object worn which does your animations, you may be able to make it where you can control it, if it is chat-command-controlled. Otherwise, you have to put an AO script in the HUD prims. From: someone I suppose, as a secondary question, can a HUD I create run animations that are not dropped into the HUD, just in my inventory? No, unfortunately, all animations MUST be in the same prim as the script trying to start them. Nothing in your avatar's inventory is accessible by script in any way.
|
|
Brandi Lane
Registered User
Join date: 2 Apr 2007
Posts: 157
|
Ahhhh
04-03-2007 10:48
From: Twisted Pharaoh I had the same problem than you until i figured out a HUD is nothing more than an object you will attach to your view, just make a basic cube with a basic Hello World script into it when touched and you ll get your first HUD. The default script does something similar.
For the animations, you need to have these dropped into it or be the default ones, maybe you could use a server too i haven't really looked at it. aaaahhhh, so then I presume a HUD with multiple buttons on it is simply a construct with a backround prim and a series of button prims. The touch event on each button prim is what triggers the action I want to script?
|
|
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
|
04-03-2007 10:51
Yes it is exactly that  .
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
04-03-2007 14:11
Just remember to set llPassTouches() to FALSE if you intend on having touchable child prims on an object. I believe that's where a lot of people run into confusions with HUD objects.
_____________________
--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.
|
|
Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
|
04-03-2007 23:28
I don't suppose anybody has seen a 4 button HUD with changing display on it, that we newbies could tear apart and expand on to create say a hud that changed a number displayed on the HUD from 1 to 4 depending on which number button you pressed? Other than llSetText how do I get a HUD to display a result from pressing buttons?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-03-2007 23:55
From: Tegg Bode I don't suppose anybody has seen a 4 button HUD with changing display on it, that we newbies could tear apart and expand on to create say a hud that changed a number displayed on the HUD from 1 to 4 depending on which number button you pressed? Other than llSetText how do I get a HUD to display a result from pressing buttons? As has been previously stated, HUD's are nothing more than standard objects attached to a HUD mount point. They work just like any other object in respect to touches. To display Text or numeric data without using settext take a look at XYText or one of the derivatives. Pick up a copy of the ZHAO or HudCalc at YadNi's, both are open source.
|
|
Daisy Rimbaud
Registered User
Join date: 12 Oct 2006
Posts: 764
|
04-04-2007 03:09
From: Talarus Luan No, unfortunately, all animations MUST be in the same prim as the script trying to start them. Nothing in your avatar's inventory is accessible by script in any way. I don't believe this to be correct - I think that animations in your inventory can be referenced by their UUID, like textures and sounds can.
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-04-2007 04:01
From: Daisy Rimbaud I don't believe this to be correct - I think that animations in your inventory can be referenced by their UUID, like textures and sounds can. Talarus Luan is half correct. You used to be able to start an animation by key however this has apparently been disabled. Daisy is correct in that you can access texture, sounds and notecards by UUID.
|
|
Tegg Bode
FrootLoop Roo Overlord
Join date: 12 Jan 2007
Posts: 5,707
|
04-04-2007 05:38
From: Newgate Ludd As has been previously stated, HUD's are nothing more than standard objects attached to a HUD mount point. They work just like any other object in respect to touches.
To display Text or numeric data without using settext take a look at XYText or one of the derivatives.
Pick up a copy of the ZHAO or HudCalc at YadNi's, both are open source. Cool, an open sourse Calc could indeed have the answers I seek... 
|
|
Storm Thunders
Polyavatarist
Join date: 31 May 2006
Posts: 157
|
04-05-2007 05:58
I've got some basic HUD info here.
|