Solved spawn mob at specific location

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

Delano

Member
Apr 15, 2018
17
2
0
25
So I made a code so a spider would spawn every 3 minutes at a variable and despawn after those 3 minutes and repeat.
This is my code:
code_language.skript:
every 180 seconds:
    spawn a spider at {Spider.Spawner.level.1::*}
    wait 180 seconds
    despawn spider
    spawn a spider at {Spider.Spawner.level.1::*}

But is doesn't work because skript doesn't recognize despawn.
and even when I only spawn a spider at that location the spider doesn't spawn.
 
I think this will work:
code_language.skript:
every 3 minutes:
    spawn a spider at {Spider.Spawner.level.1::*}
    set {_s} to last spawned spider
    wait 3 minutes
    set health of {_s} to 0
 
hm.. The spider spawning works but they won't dissapear. they only keep spawning...
But thanks for the working code for spawning though
 
Oh I thought setting the health to 0 wouldn't drop his items. Well then this code will probably work:
code_language.skript:
every 3 minutes:
    spawn a spider at {Spider.Spawner.level.1::*}
    set {_s} to last spawned spider
    set metadata "nodrops" of {_s} to true
    wait 3 minutes
    kill {_s}
    
on death:
    victim is set
    metadata "nodrops" of victim is true
    delete drops
but it does require Skellett
 
Status
Not open for further replies.