Mob spawning

  • 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!

Status
Not open for further replies.

RageMonke06

New Member
Jul 4, 2021
6
0
1
I want to make a server with custom mobs (zombies with armor). Checking the spawning areas around the player makes the server crash so I thought of killing normal zombies when they spawn and spawning the custom zombie at the same location. I tried to get the location of the normal zombie before they get killed but it doesn’t seem to work.
 
You can get the location by using the on death event and using event-location or victim's location
 
Thank you, this helped me a lot but I have another problem. When a zombie gets killed I get the location and it spawns the custom zombie but the custom zombies also gets killed because it's a zombie. How can I fix this?
 
I'm assuming it also has a custom name so you can do
if name of victim is "":
and only kill it if it doesn't have that name
 
like I said before I use normal spawning zombies and replace them with custom one, but because it has a name it doesn’t count towards the mob cap and new zombies keep spawning and as a result new custom zombies keep spawning. Is there a way to make mobs with name count towards the mob cap or make like a custom mob cap?
 
You could use a variable to count how many you've spawned and stop it if it's over a certain amount
 
Status
Not open for further replies.