Jump to content

polygraph

Resident
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

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

  1. I have a grid of 25, I changed the colors to make it easier to visualize for this post. The white underneath is the root prim, and I don't want it to speak when clicked. Green is the prize giver, link 7. Orange is the hot range, link numbers 2, 4, 5, 6, 8. Cyan is the warm range, link numbers 3, 9, 17, 19, 22, 24. Blue is the cold range, link numbers 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 23, 25, 26. The ordering of the links in comparison to the grid is a bit random because that's just how I selected things while I was building it. You don't have to use these numbers or anything, they're more outlining what I'm working with. I'd be happy enough with just being pointed in the right direction for using a list to compare against. I wanted to use a list of the ranges because I think it'd be useful to know for future projects, plus I didn't want to redo my entire linkset haha.
  2. I'm trying to set up a game to practice my scripting, where I have a grid of prims and one gives a prize on touch. I want to make each non-winning prim have a phrase that it says to tell how close you are to the prize, but I don't want to have to put a script in every single one of the prims, so I'm going to make one script and place it in a root prim. I also want to limit how many lines of code the script has to run, so I want to have set phrases that get called if the detected link number is in a defined range of numbers. This is about where I get hung up. I think I can define a range of numbers in a list, and I know how to compare the detected link to an integer, but I don't know how to combine the two. integer winner = 7; //list touchedLink = []; default { touch_start(integer num) { if(llDetectedLinkNumber(0) == winner) { llSay(0, "You found me! Here's your prize."); llGiveInventory(llDetectedKey(0), "PRIZE ITEM"); } //else if(llDetectedLinkNumber(0) == ) //{ //llSay(0, "You're ice cold!"); //} //else if(llDetectedLinkNumber(0) == ) //{ //llSay(0, "You're getting warmer."); //} //else if(llDetectedLinkNumber(0) == ) //{ //llSay(0, "You're getting hot!"); //} } }
×
×
  • Create New...