ToxicSkunky Posted August 13 Posted August 13 so i have this script and its a plant growing thing. it accepts a seed and then it gives a timer than states it is time to harvest. and it gives the harvest ect ect. but cant seem to get the watering asspect down? lol. i want it to be waterable and then it allows for the timer to continue. but i have tested it out and well idk what is wrong with it, but it wont let me do anything with it when the planter hits 0% water. I also dont know ho to make it so that no one just steals the prim out of the planter and have unlimited product. help?
Qie Niangao Posted August 13 Posted August 13 Is this an item you're trying to script yourself, or are you describing a scripted item that isn't behaving as you expect? If the latter, you probably need to consult any documentation the item's creator provided, or that creator themself. If the former… probably we'll need some more detail about how the script is trying to "be waterable", and what that means. (Like: what's "water" here?) Also, who would steal the prim from the planter? Somebody other than the owner? How would that happen unless it's specially set to allow Anyone to Copy the object? I'm probably misunderstanding, but otherwise maybe some practice with an alt would reveal more about how next-owner permissions can usually allay such concerns.
PheebyKatz Posted August 16 Posted August 16 (edited) To stop others from interfering with your plants, you'll want to include a check to see if the detected avatar is the owner when they touch the object. You'll also want the script to reset when it detects its owner has changed, so the next user can use it. If using a timer event for when it's out of water, etc., in your timer event pass some "if/then" checks. In one check you can see whether it needs water, has enough sun, etc., and if conditions call for it, the thing happens, and you tell the timer to reset (or stop, or whatever). Also, if you absolutely have to use more than one separate timer for more than one thing, you can fake a timer by checking to see how much time has passed, and if the time that's passed is over the "timer" limit, then it does the thing that happens when the timer expires. You'll want to familiarize yourself with: Touch events (touch start, touch end) llDetectedKey(), namely, something like "if (llDetectedKey()==llGetOwner()) { do stuff; } Timer events (llSetTimer(), and the section of the script that processes its whatsits, timer()) ...and somewhere on the forums thare are about 7 or 50 instances of Rolig and others showing how to use a "fake timer". You can Google "second life lsl scripting fake timer" and probably find them all easily. I hope this helps at least a little, without taking all of the fun of discovery out of it. And if none of this is any good, well, there's 50 other people here who can probably help you better than I can, so hey. Give it a minute, and they'll be around. Edited August 16 by PheebyKatz
Recommended Posts
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