You might think that this is a joke, but, I really suck at scripting since I started it this week, and I need help so, after the loop is completed, he stops, thanks in advance! If you're wondering how my code is looking... here it is: https://pastebin.com/dJ45jkGa Double Post Merge: September 16, 2017, 10:54:21 pmMade it, you can see it in my pastebin.
Last Edit: September 16, 2017, 10:54:21 pm by Doodles_Inc
I know you solved the issue, but I don't think you fully understand how while() loops work. Figured I'd explain a little to help you out.
Everything inside {curly braces} will loop forever until while(true) is evaluated as false - unless you call a break. It will work the way you're doing it (saw the pastebin, lol btw) however it is completely unnecessary if you call a wait() statement.
Basically, loops in general are intended to repeat or iterate a block of code until some condition is met. Logically if you're waiting() for a zone entrance, what code do you need to repeat? None. When you call waittill("zone_enter"), the script halts and does not process the next line until that notification is recieved, thus making a loop irrelevant. Then the next waittill("zone_enter") gets called and halts again until the player enters. So just get rid of the loop altogether, and write your code as normal. Ill give you a few examples for the sake of it. I'm no expert coder, but I can teach what I know.
Last Edit: November 30, 2017, 04:14:42 am by Archaicvirus