"Fire Projectile" - timer or loop?
Moderators: marionline, SDHawk
-
- Red Slime
- Posts: 53
- Joined: Fri Jan 13, 2023 1:13 am
"Fire Projectile" - timer or loop?
I've been digging through the "Fire Projectile" example project. Is there any advantage to using the while loop instead of the timer or vice-versa?
- Bob the Hamster
- Lord of the Slimes
- Posts: 7684
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Re: "Fire Projectile" - timer or loop?
The while loop will probably be slightly simpler
The timer avoids the problem that you can't have two scripts with wait commands running at the same time without the first one being paused by the second one.
If you are only doing the projectile script, and you know you won't have any other scripts running, use the while. Otherwise use the timer.
The timer avoids the problem that you can't have two scripts with wait commands running at the same time without the first one being paused by the second one.
If you are only doing the projectile script, and you know you won't have any other scripts running, use the while. Otherwise use the timer.