Jump to content
  • 0

Tardis hud scripts???


thedoctor2
 Share

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

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

Question

Im currently building a classic fully functional tardis, but i am no good with dialog menus so far ive nearly got the flight systems working etc and the mat/demat functions for the exterior but i need a dialog menu for the HUD. It needs to have things like summon, demat, cloaking, defences and so on as options. Ive found the basic script on SL wiki but i dont know how to make it do anything, at the moment you just click a button and nothing happens. HELP NEEDED ERGENTLY. Here is the script: list colourchoices = ["-", "Red", "Green", "Yellow"]; string msg = "Please make a choice."; key ToucherID; integer channel_dialog; integer listen_id;   default{ state_entry() { channel_dialog = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) ); }   touch_start(integer total_number) { ToucherID = llDetectedKey(0); llDialog(ToucherID, msg, colourchoices, channel_dialog); listen_id = llListen( channel_dialog, "", ToucherID, ""); llSetTimerEvent(60); //HERE WE SET A TIME LIMIT }   listen(integer channel, string name, key id, string choice) { if (choice == "-") { llDialog(ToucherID, msg, colourchoices, channel_dialog); } else if (choice == "Red") { //do something llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE } else if (choice == "Green") { //do something llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE } else { //do something else. llListenRemove(listen_id); //HERE WE ARE BEING RESPONSIBLE } }   timer() { //TIME’S UP! llListenRemove(listen_id); llWhisper(0, "Sorry. You snooze; you lose."); llSetTimerEvent(0.0); //Stop the timer from being called repeatedly } }
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I'd suggest you try asking over in the Scripting Tips forum provided that, when you do, you format your code so it's readable (use the little "Insert Code" icon, if you're using the "Rich Text" editor -- the icon is  the letter C on the clipboard, 6 in from the left).

In general (since I can recognise that mess of text), you see where it says //do something, now and again, in the listen event?   You need to replace that with code telling the script what exactly it should do when it receives a particular message from llDialog.  

So, really, first you need to decide what you happen when you tell it to "demat" or "summon" or whatever, and then ask for advice over in the Scripting Tips forum if you need help making it do whatever "demat" might mean.   

We're glad to help people learn to script there, though we don't like being asked to write scripts for people (the Wanted forum is the place to ask for that) and you'll find we're a lot more helpful if we can read the scripts you post to ask questions about.

 

  • Like 1
Link to comment
Share on other sites

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