Jump to content

firegrove

Resident
  • Posts

    3
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Rolig, thanks for the input about the llListenRemove. I had that before I put the timers in and forgot to remove it...good catch!
  2. vector tpDest is equal to Room 2 because this is a generic script for about 18 doors (notice that I don't have any of the other room/location vectors used through the rest of the script). By declaring Room# vectors and then assigning a vector for the room I am actually using this script for, it allows me to easily and quickly change the script for numerous doors. Everything for that works fine. The problem is that it doesn't wait for the student/user to answer the question before it asks them if they want to teleport. That is the delay that I'm looking for. Thanks for the input, though!
  3. I am trying to ask students a question and then teleport them if they get the answer correct (and only give feedback if they get the answer wrong). I have tried playing with the location of llMapDestination, but the script won't pause for the user input. Depending where I put the llMapDestination, it either runs automatically or won't run at all. I'm hoping someone can give me a little guidance on how to make this work. THANKS! // this code is for the teleporting doors after the students answers the question correctly integer gListener; vector Room1 = <70, 60, 441>; vector Room2 = <88, 59, 441>; vector Room3 = <105, 60, 441>; vector Room4 = <105, 43, 441>; vector Room5 = <88, 43, 441>; vector Room6 = <71, 43, 441>; vector Room7 = <71, 27, 441>; vector Room8 = <88, 27, 441>; vector Room9 = <104, 27, 441>; string simName = "TejanoTech"; vector tpDest = Room2; vector lookAt = ZERO_VECTOR; // I tried putting this in a callable function to place it in the listen function but then it will not run //teleporting () { // llMapDestination(simName, tpDest, lookAt); // } default { state_entry() { llSetText("Sample Question #1.", <1.0, 1.0, 1.0>, (float)TRUE); } touch_start(integer total_number) { integer channel = -13572468; gListener = llListen( channel, "", "", ""); llTextBox(llDetectedKey(0), "What color is the sky?\na. blue\nb. green\nc. brown.\nPlease enter ONLY the letter of the correct answer.", channel); llSetTimerEvent(60.0); // I tried this timer after seeing this in another script but it had no effect // when I put it here, the teleport runs regardless of user input llMapDestination(simName, tpDest, lookAt); } listen(integer channel, string name, key id, string message) { if (message=="a"){ llSay(0, "You are correct, the sky is blue."); // teleporting(); // If I try to place the llMapDestination here, it doesn't run regardless of user input llSetTimerEvent(0.1); } else { llSay(0, "Sorry, that's incorrect. The sky is blue."); llSetTimerEvent(0.1); } llListenRemove(gListener); } timer() { llListenRemove(gListener); llSetTimerEvent(0); } }
×
×
  • Create New...