Jump to content

Making a Map HUD


Wymoree
 Share

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

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

Recommended Posts

I am the Directory of Transportation for the Town of Avon. I am trying to make a HUD for my drivers so they can see where they are and their route. How do I make a map HUD that traces out the route.

I can find plenty of scripts to achieve the first part but can't seem to figure out the second part.

Thank you in advance for any help.

Link to comment
Share on other sites


Qie Niangao wrote:

I don't understand the problem. Are there so many different possible routes that they can't just be pre-defined and overlaid as a separate (alpha-masked) texture on top of whatever map you decide to use?

And once you have done Qie's step, so that you have a collection of route overlays to drop onto your HUD as needed. you just need to create one more simple overlay.  Make it entirely transparent except for a nice yellow dot, right in the middle.  Then, write your script to poll llGetPos every second or so.  Scale that vector to the size of your HUD and translate it to an offset vector, so that the yellow dot marks the position on the HUD that corresponds to your current position on the ground.  There's a little bit of math involved but it's all simple addition, subtraction, and scaling -- no rotations needed.

Link to comment
Share on other sites

I forgot to mention that I am relativly new to LSL scripting. I have managed to write a script that whille loop through messages on a set timer.

I am flying blind here so I aplogize for my ineptitude.

So the bottom layer would be the map.

Layers in between would be the differnt routes (??) [ideally these should be filterable so the drivers can focus on their assigned route]

The top layer would be the yellow dot marking the driver's current position (??)

Link to comment
Share on other sites

Yes, but of course you only need to display one of the route textures at a time.  The others you just keep in a list by their UUIDs.

If you are totally new to scripting, this is too ambitious a project for you.  If you have some scripting background and some patience, though, it's a nice challenge to learn with.  It basically means creating an object with three stacked prims.  You swap a route texture onto the middle one and you script the top one (the dot) as I described, so that the dot moves around on the map as you move around on the ground.

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...