Mob stacking

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

    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.

elpupper

Member
Mar 22, 2018
4
0
0
21
The following code is to stack mobs
on spawn of zombie:
"%spawn reason%" = "spawner"
set metadata "spawnerspawned" of event-entity to true
loop all entities in radius 20 of event-entity:
loop-entity is a zombie
metadata "spawnerspawned" of loop-entity is set
event-entity is not loop-entity
delete event-entity
name of loop-entity is set:
set {_name} to name of loop-entity
replace all "x" with "" in {_name}
set {_name} to "%{_name}%" parsed as a number
add 1 to {_name}
set name of loop-entity to "&c&lx%{_name}%"
But I'm getting errors sadly
https://imgur.com/a/aK08Z
aK08Z

I have skquery and skellet and skutilities
also my mc verision is 1.12.2
 
Last edited:
Looking at the syntax in DOCS and your code, try
code_language.skript:
%spawn reason% is "SPAWNER"
instead of "="

Im not sure about the metadata one, sorry can't help ya there.
 
Status
Not open for further replies.