SolvedHow to make a command loop

Posts 1–11 of 11 · Page 1 of 1
How to make a command loop
So how would i make a command loop

so /spawn oryx the mad god 2 would infinitely loop it and let me shoot and run and stuff without having to type it again?
Wouldn't expect you to ask how to spawn an Oryx...

The most simplest way would be to handle it via Tick in Player, you can set a bool to true by using a command which will then execute what you want it to do every set amount of time. (if true)
Quote Originally Posted by sgrawsreghawrhgwrhgr View Post
Wouldn't expect you to ask how to spawn an Oryx...

The most simplest way would be to handle it via Tick in Player, you can set a bool to true by using a command which will then execute what you want it to do every set amount of time. (if true)
Tick in player?
Quote Originally Posted by SwatSecOne! View Post
Tick in player?
void Tick in Player.cs.
What do you mean? Just type "/spawn Oryx the Mad God 2" and then start shooting and running and stuff? Not quite sure what you're asking? Are you asking for it to spawn a few seconds after you type "/spawn Oryx the Mad God 2" so you have time to get out of the danger zone and instantly die, or are you asking for it so automatically loop and spawn O2 once the last one dies? Or..? Be a tad bit more specific:3
Quote Originally Posted by Riigged View Post
What do you mean? Just type "/spawn Oryx the Mad God 2" and then start shooting and running and stuff? Not quite sure what you're asking? Are you asking for it to spawn a few seconds after you type "/spawn Oryx the Mad God 2" so you have time to get out of the danger zone and instantly die, or are you asking for it so automatically loop and spawn O2 once the last one dies? Or..? Be a tad bit more specific:3
automatically loop and spawn O2 right ontop of me where ever I am but it loops so after 1 spawns another spawn and another and so on and so on
If you want to spawn couple of them in the same time then you the command "/spawnx {Amount} Oryx the Mad God 2"
Use tasks and create a simple for loop with a "Task.Delay(delayInMs).Wait()" at the end
Alright, so you want basically to keep spawning O2's over and over again without having to repeatedly type it..

Not sure why you would want this, would intensely stretch the servers performance quality at the time and unless you are using a weapon that does an insane high amount of damage to keep instantly kill them, eventually the server will crash/freeze.

Why is everybody in this section so needy for useless and weird commands that make zero sense in every possible way.

Only way I even see something like this useful for Coral Gifts maybe if you were hosting a spawning event or something, even with that, you can just type the amount in the actual command execution and it will stack X Coral Gifts on top of each other.

But having them spawn one after another with almost any other entity that has a unique behavior.. uhh.. well.. all I can say is that you're screen will be filled with hundreds of O2's before you can even get the chance to kill a few.

I guess someone (I will when I get some free time, haven't touched private server stuff in weeks, maybe even a few months) could make a command such as "/spawnloop X E"
X = amount of time in MS in-between spawning the next entity
E = entity
and then another command to stop it, or just add it into the existing command (Example: "/spawnloop off").
example of how my command would probably work and a good idea of how anyone else should make it if I don't get to it first..^
Quote Originally Posted by Riigged View Post
Alright, so you want basically to keep spawning O2's over and over again without having to repeatedly type it..

Not sure why you would want this, would intensely stretch the servers performance quality at the time and unless you are using a weapon that does an insane high amount of damage to keep instantly kill them, eventually the server will crash/freeze.

Why is everybody in this section so needy for useless and weird commands that make zero sense in every possible way.

Only way I even see something like this useful for Coral Gifts maybe if you were hosting a spawning event or something, even with that, you can just type the amount in the actual command execution and it will stack X Coral Gifts on top of each other.

But having them spawn one after another with almost any other entity that has a unique behavior.. uhh.. well.. all I can say is that you're screen will be filled with hundreds of O2's before you can even get the chance to kill a few.

I guess someone (I will when I get some free time, haven't touched private server stuff in weeks, maybe even a few months) could make a command such as "/spawnloop X E"
X = amount of time in MS in-between spawning the next entity
E = entity
and then another command to stop it, or just add it into the existing command (Example: "/spawnloop off").
example of how my command would probably work and a good idea of how anyone else should make it if I don't get to it first..^
OMG YOU WOULD DO THAT FOR ME? thanks so much I love you
Why not just make an entity do it? Simple behavior such as, spawn Oryx, changes to a state where it checks for Oryx to be dead, then repeats.
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us