#spawn only 1 mob in specific region
1 messages · Page 1 of 1 (latest)
if event-location is in region "cherry":
if entity is a skeleton:
if name of entity is "&x&F&F&6&4&6&4&lCherry's Helpers":
stop
cancel event```
Send errors if there are any, otherwise explain what isn't working exactly
There aren t errors
When i try to spawn the skeleton named that way it doesn t work
I tried without that skript and it worked
If a skeleton spawns in a certain region with a certain name you want to cancel the event right
Whats the problem then lol
You need to explain your problem better
Well i want it to spawn but to be the only mob that can be spawned
The skeleton to be the only mob that can spawn
In that region
Okay, why do you write "if entity is skeleton:" when you want skeletons to spawn
he doesnt cancel if its a skeleton
Yeah the indentation is just wrong on the cancel event
also when would a mob that is just spawning in have a name
He possibly has another skript giving a mob a name when it spawns
it's not if he wants only skeletons named that to spawn
Prob region of event location
And the indentation of cancel event is wrong
Remove the stop
Hey! The issue is mainly the use of stop, you don’t need that there at all and it actually messes things up a bit, also the indentation of cancel event is probably off, it needs to be inside the right condition so it only cancels mobs that aren’t the named skeleton. I would also suggest you to make sure you’re checking the region right too, sometimes using region at event-location works better depending on your setup
Your idea is to cancel every mob that spawns in that area except your custom skeleton, so just let that one through and cancel the rest
actually the stop makes it so that it doesnt cancel the custom skeletons
youre wrong AGAIN
That is true
Ok, i will go straight to the point because it seems I didn't explain it well: The problem is how you verify the region, the structure with stop **can **work, but if you rwwrite it without stop it could be clearer..
First, use %region at event-location% to verify the region, no event-location is in region. This allows only skeletons with the specified name to spawn as well as it cancels other spawns. I would also recommend you to make sure that the cherry region is well defined in your server, I guess you are using a region plugin.
I suggested that the stop was unnecesary, which was wrong, however, I also mentioned the importance of veryifing the region correctly and indentation, which is still being relevant. I offered an alternative without stop because it could be useful if you prefer a more straightforward logic. But I agree with you, I was wrong about the stop.
@winter sapphire are you the yap king?
I just like to help 
if %region at event-location% contains "cherry":
if name of entity is "&x&F&F&6&4&6&4&lCherry's Helpers":
stop
cancel event```
you need quotes around the region check, not only percent signs
%stuff% --> "%stuff%"
also, newly spawned mobs don't have a name just yet, you need to wait a tick before you check the name
no problem