Increase mobs follow range

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

Erry215

New Member
Feb 8, 2017
5
0
0
65
Hey, I'm looking for a way to spawn mobs, most likely zombies.
Now, the problem is that if I spawn them more than 30 blocks away from a target they don't see him. How can I improve this range in Skript? In vanilla I found "{Attributes:[{Name:generic.followRange,Base:<RANGE>}]}" but, I really don't know how can I do it in Skript.
Thanks.
 
You can add that nbt tag using skstuff although unless you're avoiding future minecraft updates I don't recommend you use skstuff, your alternative to that would be skript-mirror.

Example with Skstuff:
code_language.skript:
add "{Attributes:[{Name:""generic.followRange"",Base:100.0}]}" to nbt of spawned entity

Example with Skript-Mirror:
code_language.skript:
set {_attribute} to spawned entity.getAttribute({Attribute}.GENERIC_FOLLOW_RANGE!)
{_attribute}.setBaseValue(100);

edit:
ops forgot you have to add this to the skript-mirror example:
code_language.skript:
on script load:
    import "org.bukkit.attribute.Attribute"
 
Last edited:
Status
Not open for further replies.