Spawn more Citizens

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Le4ft

Member
Jun 26, 2023
20
0
1
Hi,
I'm trying to make more citizens (exactly 30) to spawn at some location when the skript load, I need them to attack each other and also attack players but also they need to be close to the spawn (i can do that with npc path). But my main question is how can I make that when player uses a booster (i have that stored as {boosters::%player%::bots}) to double the amount of bots (so without boosters its 30 and with boosters its 60), also when the booster ends the amount of bots will set to 30 again.

Does anyone have some ideas how can to make that?
 
This likely won't be a resolve all solution but a good idea on how to get started: Setting up a variable which sets a random location between 2 different coords for randomly spawning citizens within them. Then you use an if statement or two to determine if a player uses a booster and multiplying the amount of citizens spawned if the booster is used. You'd also then need to check if the booster is no longer valid than to kill/remove 30 of them. To spawn in the citizens themselves you could use a console command or find a way that's script friendly to spawn em in with code.

I'd also recommend having a chance system set up to make it a low chance for them to damage themselves (Or make it so they deal very low damage to one another) as otherwise the npcs could easily slay each other before the player themselves got a chance to.