Jump to content

HUD Script making help


zigazav
 Share

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

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

Recommended Posts

OK, so I need help making a HUD script. I want it so it's like an AO HUD script, but I have no skills in scriting AT ALL! CAn omebody help me make a HUD script? It would really help. I'm making a Sonic character I made-up, so I want to make a HUD to go with her.

Link to comment
Share on other sites

I don't really have any programming knowledge. I don't know much about scripts other than a couple things: What one thing says affects another thing in the scripts, and that to use the scripts you have to put them into an object or something. That's pretty much all I know about scripts. I know, I'm a script noob.

Link to comment
Share on other sites

That you are new to scripting is ok - it just helps us to know where to start and how to help you.

First of all, you should get aquainted to some basic concepts - take a look at the tutorials here - in general, the wiki should become your best friend when (starting to) script.

Once you have a basic idea, try to identify a simple task in your HUD and se if you can structure it in a way that you can turn in to LSL - people here will be glad to help you with solving such tasks.

As for me, you can get in touch with me inworld, too.

Link to comment
Share on other sites

In addition to the hud you'll need the animations for your character. Are those ready made ones? If so you might want to take a deep breath and dive into the famous ZHAO-script. That's an opensource AO available as a freebie all over SL that might well do most of the things you might need. But remember to breathe calmly while dealing with it ^^ Some other ressources I mentioned in your other thread...

Have fun ;-)

Link to comment
Share on other sites

What I want as one of my Sonic FC's things to do with her HUD is to toss a huge block (With a texture or something to make it look like candy rock) coming-out of her hand, since she did that to break-out of jail countless times. Then again, I could just make a weapon item that does that. But since I'm a noob at scripting, I don't know how to do that.

Link to comment
Share on other sites

That can be an interesting little project. I can imagine how some parts of it could be done. But depending on the level of detail and accuratesse you desire it can grow into a real challenge. But I'm no great scripter too - maybe someone knows of an easier way of archiving this than me.

Link to comment
Share on other sites

Um, for the throwing the candy rock block, the looking position when about to use it, it will be right over her shoulder, and if it's possible, the cross-hair thingie will look qquite abit like a small piece of candy, the small wrapped in basic candy wrapper. Stand animation for before she fires the candy rock would be she would hold-out her robotic hand with hands in a claw shape pose. Sound would be a something got fired out of something, but not too loud of a sound, also, I want it to be heard by anyone nearby. Reload sound would be just a bunch of small bits of stuff being dropped. Something sounding close to the SFX of the Lego video games when picking-up studs would work nicely.  Also, since the candy rock is so heavy, only one fire before needing to reload. Now, I've only revealed one other weapon she has (besides her Breast candy cannon, since that was only used in the RP so far when she was firing it into people's mouths to fatten them up), and that's the candy bomb. A typical grenade shape for the object would do, I would just need to retexture it. For the sound, it's would be a small explosion sound, and the explosion look would be a bunch of rainbow particals, to show candy being fired in it, but I would tone it down than what was done in the RP, since in the RP, it had enough candy to bury everyone nearby her alive in candy! Her grenade would be a sort of a trapping based weapon. Upon exploding, if the target get's hit, they get trapped by around them in prims with candy textures. That's about it for weapons for now. The HUD would allow switching of weapons. Sorry for going on so long, it's a habit of mine. Seeya I guess. 

Link to comment
Share on other sites

This is a simple script you can modify, but this might give you a idea on what too use. You can setup this script so it reads off a hud making it so you can switch between bullet (Candy Rock / Grenade). But as for animation/sound you're on your own I'm only a scripter :D

 

/** reload Sound - Sound file of reload, found in inventory(UUDI WORKS)* fire Sound - Sound file of gun firing, found in inventory(UUDI WORKS)* aim - Animation file of Aiming down sights (Looking Mouse view)* stand - Animation file of Pose stand while standing still* ammo - Name of bullet / object shooting* SPEED - Bullet Velovity set by m/s* DELAY - Time spent reloading (This is set so you can't spam the bullet) by m/s*/string reload_sound="";string fire_sound="";string aim = "";string stand = "";string ammo = "";      float SPEED = 75.0; //Speed bullet will go            float DELAY = 0.2; //60.0 = 1min           /*Best too leave alone*/                                vector vel;                          vector pos;                         rotation rot;                       integer have_permissions = FALSE;                            integer armed = TRUE;                                      fire(){    if (armed)    {        armed = FALSE;        rot = llGetRot();                       vel = llRot2Fwd(rot);                   pos = llGetPos();                       pos = pos + vel;                       pos.z += 0.75;                                                                                                          vel = vel * SPEED;                               llTriggerSound(fire_sound,0.8);         llRezObject(ammo, pos, vel, rot, 1000);         llTriggerSound(reload_sound,0.8);               rot.z = rot.z *-PI ;        llRezObject("Shell",pos+<-0.0,-0.0,-0.0>,-llRot2Left(rot),rot,0);                                                llSetTimerEvent(DELAY);             }}default{    state_entry()       {        if (!have_permissions)         {            llRequestPermissions(llGetOwner(),                  PERMISSION_TRIGGER_ANIMATION| PERMISSION_TAKE_CONTROLS);           }    }     run_time_permissions(integer permissions)    {               if (permissions == PERMISSION_TRIGGER_ANIMATION| PERMISSION_TAKE_CONTROLS)        {            llTakeControls(CONTROL_ML_LBUTTON, TRUE, FALSE);            llStartAnimation(stand);            have_permissions = TRUE;        }    }    attach(key attachedAgent)    {               if (attachedAgent != NULL_KEY)        {                        llRequestPermissions(llGetOwner(),                  PERMISSION_TRIGGER_ANIMATION| PERMISSION_TAKE_CONTROLS);           }        else        {                       if (have_permissions)            {                llStopAnimation(stand);                llStopAnimation(aim);                llStopAnimation(stand);                llReleaseControls();                llSetRot(<0,0,0,1>);                have_permissions = FALSE;            }        }    }    control(key name, integer levels, integer edges)     {                if (  ((edges & CONTROL_ML_LBUTTON) == CONTROL_ML_LBUTTON)            &&((levels & CONTROL_ML_LBUTTON) == CONTROL_ML_LBUTTON) )        {                        fire();        }    }        timer()    {               llSetTimerEvent(1.0);        armed = TRUE;    }  } 

 

Link to comment
Share on other sites

OK, so, what do I edit from there, and what do I put in? And your phrase to let my creativity out of it's cage? It's been in it's prison for a long time now. I have very little creativity left after it's been shut tight inside me. No joke, it's really hard to get any to come-out. I'm no good with scripts, but once I get enough work done on her parts, I'll work on the scripts. I'll go ask somebody something in abit.

Link to comment
Share on other sites

That just my faviort quote, I was tutored by someone in my high school programming class that said that :) An he one that got me over too dark side.. The darkside meaning coding hehe

 

but you edit. The sound you enter the name of it or UUDI key, and for animtion you put name and make sure the sound/animtions are in the object/gun. For the ammo its name of bullet/ candy rock. Speed and Delay you can just leave alone for now :)

string reload_sound=""; string fire_sound="";string aim = "";string stand = "";string ammo = "";      float SPEED = 75.0; //Speed bullet will go            float DELAY = 0.2; //60.0 = 1min
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4294 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...