Summoning mobs

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

HollowwwMC

New Member
Jul 14, 2024
6
0
1
I am trying to make code that will summon 2 zombies with armor at once on either side of the player, while also giving armor and buffs to both. How would I do that?
Here's my current code, the last works for just one, but the first doesn't work:

on rightclick:
if player's tool is {customitem::mobbook}:
spawn 2 zombies at location of player
equip first spawned zombie with diamond helmet of protection 3
equip first spawned zombie with diamond chestplate of protection 3
equip first spawned zombie with diamond leggings of protection 4
equip first spawned zombie with diamond boots of protection 4
apply strength 10 to first spawned zombie for 10 minutes
apply speed 6 to first spawned zombie for 10 minutes
equip last spawned zombie with diamond helmet of protection 3
equip last spawned zombie with diamond chestplate of protection 3
equip last spawned zombie with diamond leggings of protection 4
equip last spawned zombie with diamond boots of protection 4
apply strength 10 to last spawned zombie for 10 minutes
apply speed 6 to last spawned zombie for 10 minutes
on entity target:
if first spawned zombie's target has {customitem::mobbook} in inventory:
cancel event
on entity target:
if last spawned zombie's target has {customitem::mobbook} in inventory:
cancel event