Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Using a hud to display scores and make decisions

Rocketman Raymaker
Registered User
Join date: 4 Feb 2007
Posts: 530
04-13-2007 18:59
Hi there,

I am creating a game for SL and what i want to do is add a hud to it so the user can see their current scores and make decisions that will affect the rest of their game. The idea is that they pay to play the game and then are given a hud to wear.

A similar example of what i am trying to do are the poker huds used to play on the poker tables except my game is only one player.

So anyway, i know how to create a hud and i know how to create the game but what i need to know now is how i communicate between them so they update each other as the game progresses.

Do i treat them as linked objects (ie one object) or as separate objects?

Also is there a way to add text and numbers to the prims without using llSetText? (ie for updating scores and changing the name of the player with the high score) or will i need to use textures?
_____________________
"Proud member of the anti-ginko busy body committee"
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
04-13-2007 19:40
Communication is between 'separate objects'...ie...llWhisper() on an obscure channel usually works the best.

You can always use XYText for text-displays...and yes, that's a texture-changing way of doing it.
_____________________
--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.
Fenrir Reitveld
Crazy? Don't mind if I do
Join date: 20 Apr 2005
Posts: 459
04-14-2007 00:51
In my game Ring Race (playable at Furry Vermin Island -- search for it in places), the player's HUD acts as the central coordinator for the game. So, the rings communicate with the HUD, which keeps track of the player's "score" (in this case, their time) and then communicates it back to the other rings for permenant processing (ie: adding to scoreboard).

This is about as close as we can get to storing actual properties on a player to state track a game; Really wish there was a way to do this, but I come from a MU** background. I can't easily use a central coordiator prim because the player might fly over multiple-sims worth of area, well outside the range of a llShout.

Your task would be simpler if your game all occured in one location, with easy llWhisper/llSay range of all of the game's components. The HUD could then just be a status display, slaved to the master script that drives the game logic.
_____________________
----
----
----