help pls

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

    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!

lateeagle

Active Member
Jan 29, 2025
104
8
18
What's wrong with this?
Zombies aren't spawning at the _spawnLoc

Code:
function summonZombies(spawnLoc: location):
    while {spawning_zombies} is true:
        send "%{_spawnLoc}%" to players
        spawn zombie at {_spawnLoc}

        if {difficulty} = "easy":
            wait 60 seconds
        if {difficulty} = "normal":
            wait 30 seconds
        if {difficulty} = "hard":
            wait 20 seconds
        if {difficulty} = "nightmare":
            wait 10 seconds

function zombieSpawn():
    if {selected_map} = "forest":
        delete {zombiespawnblocks::*}

        loop all blocks within location(535, -30, 66, world "zombie") and location(380, -64, -68, world "zombie"):
            if loop-block is black concrete powder:
                add loop-block to {zombiespawnblocks::*}

        loop {zombiespawnblocks::*}:
            set {_loc} to location of loop-value
            summonZombies({_loc})
535, -30, 66, world "zombie") and location(380, -64, -68, world "zombie"):
if loop-block is black concrete powder:
add loop-block to {zombiespawnblocks::*}

loop {zombiespawnblocks::*}:
set {_loc} to location of loop-value
summonZombies({_loc})