Mob Spawn

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

flash565

Member
Jul 28, 2024
3
0
1
25
Hi, I want the player who kills a mob to be rewarded if the mob was naturally spawned, and also, mobs spawned from mob farms etc. should not be included in this. is this possible?
 
Alright, I did a little research and I don't think there's an easy way to do this with Skript. The best thing I found you could use (If you figured out how to) would be this: https://docs.skunity.com/syntax/search/id:10555. Basically different classes for how something could spawn. Not sure how you would use these since there is no example provided, but it's better than nothing. Alternatively, if you cannot figure out how to do it or that doesn't work, you could always try coding a Plugin, detect an EntitySpawnEvent and then check the spawn reason.
 
Alright, I did a little research and I don't think there's an easy way to do this with Skript. The best thing I found you could use (If you figured out how to) would be this: https://docs.skunity.com/syntax/search/id:10555. Basically different classes for how something could spawn. Not sure how you would use these since there is no example provided, but it's better than nothing. Alternatively, if you cannot figure out how to do it or that doesn't work, you could always try coding a Plugin, detect an
Code:
on spawn of chicken:
    if spawn reason is natural:
        set the display name of the last spawned chicken to "Natural Chicken"
This code doesn't work when I try it, but it doesn't give any errors either.
if spawn reason is 'natural' is not working as well.