Quagsire Posted March 6, 2017 1. How do I do a basic loop? 2. How do I make it where you have to kill a certain amount/type of enemies before something occurs? 0 Quote Share this post Link to post
Nevander Posted March 6, 2017 1. For loop done like this:for(int x = 1; x < 10; x++) { // Do stuff }More info here. 2. Using a while loop in conjunction with ThingCount:While(ThingCount(0, TID) > 0) Delay(10); // Do stuff after they are dead 0 Quote Share this post Link to post
Quagsire Posted March 6, 2017 Nevander said:1. For loop done like this:for(int x = 1; x < 10; x++) { // Do stuff }More info here. I believe there was another script for looping which involved an action repeating until there was 0 of something. 0 Quote Share this post Link to post
Nevander Posted March 6, 2017 Sgt Ender said:I believe there was another script for looping which involved an action repeating until there was 0 of something. You could make an OPEN script and make it delay until a certain variable becomes true, and then give each monster a script to increment that value by one each time. Then once all dead, the OPEN script continues. If the monsters needing to be killed are spawned via ACS also, you can use SetThingSpecial to give them the script. Thing scripts for monsters always execute on death IIRC. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.