Rycky91 Posted October 1, 2015 I have another dumb question Okay, to start I am trying to make a wall that shoots fireballs at the player. I got it right only It shoots once then stops. I want it to continuously shoot fireballs, like in the guardian of ice, the room to the left when you enter. I used the while expression and inserted a delay but the script is still a runaway. Then when I put the delay below the while the fireballs shot once. I may be stupid or not understand what I am doing wrong Here is the code #include "common.acs" int mapvar0; script 4 (void) { Door_Open(4,60); int var0; var0 = 1; while (var0 < 3) Delay(2); Thing_ProjectileGravity(15, T_FIREBALL1, 270, 32, 32); thingsound(15, "FireDemonAttack", 127); Thing_ProjectileGravity(16, T_FIREBALL1, 90, 32, 32); thingsound(16, "FireDemonAttack", 127); } Can someone please help? 0 Quote Share this post Link to post
Gez Posted October 1, 2015 Close the code tags by using [/code]. As for your problem, wrap in curly braces everything that should be in the while loop. Like this: #include "common.acs" int mapvar0; script 4 (void) { Door_Open(4,60); int var0; var0 = 1; while (var0 < 3) { Delay(2); Thing_ProjectileGravity(15, T_FIREBALL1, 270, 32, 32); ThingSound(15, "FireDemonAttack", 127); Thing_ProjectileGravity(16, T_FIREBALL1, 90, 32, 32); ThingSound(16, "FireDemonAttack", 127); } } 0 Quote Share this post Link to post
Rycky91 Posted October 1, 2015 Okay. I see my error. Thanks for the help. 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.