Jump to content

Making a RP Hud? Where to start?


Keanna Spyker
 Share

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

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

Recommended Posts

Hi there, I was thinking about creating my own RP HUD for me and my friends-- This isn't use for a sim or anything. I'm curious about it as a project. I'm comfortable learning scripting (I understand some python and some MEL) and want to know where I would start looking for making some elements of the HUD.

Some things I would like to include:
- Base stats like DND or other TTRPG settings
- Target select to compare for combat/skills
- Weapons or Items that modify those stats
- Weapons or Items that modify with a countdown
- Delete on Use Items
- Choose between collision combat or dice mode
- Freeze, bump, or move AVs based on the collision/skill used
- Announce of results in chat

Could anyone provide advice on the sorts of topics I should be learning to accomplish these things?
(Thank you kindly in advanced!)

Link to comment
Share on other sites

One place to start is with the general mechanics of creating a HUD. There's a nice intro at http://wiki.secondlife.com/wiki/Creating_HUDs . With the exception of the stuff that's mentioned in that article, most of the scripting you'll do in a HUD is no different than from what you do in any object.  After all, a HUD is simply an object that is attached to your screen instead of being rezzed on the ground or attached elsewhere on your body.

You will find the llDetectedTouch functions handy for identifying which face/link/position on your HUD the owner has clicked on.  You will also find that you'll use llDialog and llTextBox functions fairly often and that you'll have to think about how to manage menu structures and how to store values in your HUD.  Since you have some coding experience already, these are probably familiar challenges, even if you have not encountered them in LSL yet.  I suggest working modularly, developing one functionality at a time and building up your planned HUD in steps, so that it's easier to test and so that you don't get overwhelmed.  You will find several relevant examples in the LSL Scripting Library and in the various examples that are included in each of the function pages in the LSL wiki.

Once you get into the project and have specific questions or find yourself backed into a corner, feel free to post here in the Scripting forum.

  • Like 1
Link to comment
Share on other sites

You'll want to get familiar with llListen and the Listen event. most of creating a 'system' like this is deciding on and implementing communication protocols, and deciding which part of the system has what duties.

(Ex. Person A presses the button on their HUD to attack, does Person A's hud decide who gets hit and only send them a message, or does the HUD of person B check whether person A is in range and facing them. Both are equally valid options.)

  • Like 1
Link to comment
Share on other sites

Depending on how large of a project you're thinking of, LSL scripting may not be enough. If your RP HUD is going to interact with RP-specific objects, and either scripts need updating, how will you handle that? Hand-replace all scripts with new versions? Send updated HUDs/objects to users/owners?

There are some systems like JasX games, or especially GPHUD where all the scripting (and everything else) is set up through a website. This allows all scripts, including the HUD, to be updated live without anyone having to even reattach their HUD for updates.

Creating something like GPHUD is a massive undertaking though, it's not really a good learning experience so I don't recommend going that route since you're new.

But ideally you would still think about how frequent and how significant your updates will be after your system is used by someone other than just yourself and a small handful of people. Updating scripts by hand is totally doable if the system is not in wide use, and I think most people would just send the updated objects/scripts as some sort of a bundle.

Edited by Wulfie Reanimator
  • Like 1
Link to comment
Share on other sites

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