#Mobs breaking blocks

1 messages · Page 1 of 1 (latest)

charred kernel
#

Is there a way to make mobs able to break blocks? Like a zombie being able to break doors, but instead of doors all blocks

late cobalt
#

have them scan nearby blocks, path find to, and apply black magic to destroy block

uneven mirage
#

^^^

late cobalt
#

you can just add some fancy particles and set block to air

charred kernel
#

I dont want it to instantly break the block

#

My plan is having a hologram above every block in the minigame (not much) and then when a zombie is near it removes 1 of the variable used in the hologram

#

but how im going to do it

#

no idea

charred kernel
uneven mirage
#

Set a variable at the event location

#

Then if theres a zombie in a smal radius “damage” it

charred kernel
#

and how do I check if a zombie is near the event location?

uneven mirage
#

loop in small radius

charred kernel
#

and how would I do that

uneven mirage
#

with a loop

#

you should read the docs

#

loop all %things% in radius x around {_loc}:

charred kernel
#

thank you

#

and things would be an entity?

uneven mirage
#

yes

uneven mirage
charred kernel
#

alright thanks, I will try to use this to make something now

charred kernel
charred kernel
#

I fixed most of it but I can't figure out how to make a hologram and then link it to the event block without using the list

#

for example this {placed::turrets::%player's uuid%::*} how do I select the one that was just placed out of there for this set {health::%{placed::turrets::%player's uuid%::*}%}

uneven mirage
#

?

#

just loop it?

#

i dont have enough context

charred kernel
#

1 sec

#
    if name of player's held item contains "&3Turret":
        add location of block above event-block to {placed::turrets::%player's uuid%::*}
        play sound "entity.experience_orb.pickup" at volume 100 at pitch 1 for player 
        send action bar "&aSuccessfuly placed your turret!" to player
        set {health::%{placed::turrets::%player's uuid%::*}%} to 10
        set {_holohealth::%{placed::turrets::%player's uuid%::*}%} to new hologram at location block above event-block
        set text of holo {_holohealth::%{placed::turrets::%player's uuid%::*}} to "test" in line 0 ```
#

I want to create a health hologram above but I was getting errors with the list and then when looking at it I got very confused about how lists worked and how I should fix this

#

im probably doing it completely wrong

uneven mirage
#

line 6 is the issue

#

could just use the size of the list ig

charred kernel
#

the feeling i have (idk if its right) that if I fixed this code with the list and it would work that it would then create new holograms for all of the locations on the list and it would just be completely messed up

#

Do you know how I do this:

create a hologram above the placed block that shows a variable, and that variable is linked to the location of the block and will be set to 10

uneven mirage
charred kernel
#

idk what u mean by that

#

ill try reading docs

uneven mirage
#

size of a list

#

its how every many values

#

returns na integer

charred kernel
#

I got everything to work, I got 2 more questions that have to do with a radius, is it possible to make a minimum? so like atleast 3 block radius away but maximum of 20 blocks away

uneven mirage
#

With conditions

charred kernel
# uneven mirage With conditions

I currently have:

            set {_loc} to loop-value-2
            set {_loc1} to a random element out of blocks in radius 10 of {_loc}
            while y coord of {_loc1} is not y coord of {_loc}:
              set {_loc1} to a random element out of blocks in radius 10 of {_loc}
            if y coord of {_loc1} = y coord of {_loc}:
              spawn zombie at {_loc1}```
this is definetly not the most efficient way to do this but what I am thinking of is something like
```if y coord of {_loc1} is not y coord of {_loc}:
   start the loop from the beginning again (idk how to though)```
uneven mirage
#

While a (!)= b:
set a …

#

So set {_a} to random element from {_list::*} while {_a} != {_list::43}: set {_a} to random element from {_list::*}

charred kernel
#

I dont understand tbh

uneven mirage
#

While y1 != y2:
set y1

dull zinc
#

adding a ! before = just means "not equal to"

charred kernel
#

I get that, but how do I make it not spawn in a radius of 3 blocks

#

so in a radius of 10 blocks but not 3 blocks, so 3-10 blocks away

late cobalt
#

if location is within that 3 block radius, try again (find another location within the 10 radius)

#

alternatively

#

just add some amount to the location so its outside the 3 block radius

charred kernel
#

I currently have loop {zombie} times: set {_loc} to loop-value-2 set {_loc1} to a random element out of blocks in radius 18 of {_loc} while y coord of {_loc1} is not y coord of {_loc}: set {_loc1} to a random element out of blocks in radius 18 of {_loc} while distance between {_loc} and {_loc1} is less than 14: set {_loc1} to a random element out of blocks in radius 18 of {_loc} if: y coord of {_loc1} is y coord of {_loc} distance between {_loc} and {_loc1} is more than 14 then: spawn zombie at {_loc1}

#

but this doesnt spawn all of the zombies

#

so something is going wrong

late cobalt
#

what the

#
then:```
#

is a thing?

charred kernel
#

yea

#

skript 2.7

late cobalt
#

well ur issue is that when conditions are not met

#

the zombie doesnt spawn and you havent tried to spawn another in its place

charred kernel
#

how do I do that then?

#

I thought i was doing that with while

late cobalt
#

set {_loc} to loop-value-2

#

whats loop-value-2

charred kernel
#
  if {started} is 1:
    loop all players:
      loop {goldblock::%loop-player's uuid%::*}:
        remove 1 from {zombie}
        add 50 to {gold::%loop-player's uuid%}
        broadcast "%{zombie}%"
        if {zombie} = 0: 
          wait 10 seconds
          add 1 to {wave}
          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
          set {zombie} to ({wave} * 4)
          loop {zombie} times:
            set {_loc} to loop-value-2
            set {_loc1} to a random element out of blocks in radius 18 of {_loc}
            while y coord of {_loc1} is not y coord of {_loc}:
              set {_loc1} to a random element out of blocks in radius 18 of {_loc}
            while distance between {_loc} and {_loc1} is less than 14:
              set {_loc1} to a random element out of blocks in radius 18 of {_loc}
            if:
              y coord of {_loc1} is y coord of {_loc}
              distance between {_loc} and {_loc1} is more than 14
            then:
              spawn zombie at {_loc1}```
late cobalt
#

btw

#

is {zombie} the counter for how many zombies alive?

charred kernel
#

yes

late cobalt
#
      loop {goldblock::%loop-player's uuid%::*}:
        remove 1 from {zombie}```
#

move it outside the loops

charred kernel
#

the removing 1 on death of zombie works though, it works completely fine if i dont have the: while y coord of {_loc1} is not y coord of {_loc}: set {_loc1} to a random element out of blocks in radius 18 of {_loc} while distance between {_loc} and {_loc1} is less than 14: set {_loc1} to a random element out of blocks in radius 18 of {_loc} if: y coord of {_loc1} is y coord of {_loc} distance between {_loc} and {_loc1} is more than 14 then: spawn zombie at {_loc1} if and while things

late cobalt
#

you need to reorganise ur loops

#

since

#

everything is inside loop all players: loop {goldblock::%loop-player's uuid%::*}:

#

wait whats {goldblock::%loop-player's uuid%::*}

charred kernel
#

that is the "starting block" its basically the core of the base the player is trying to protect from the zombies

#

you can only place one

late cobalt
#

this is coop pve right

charred kernel
#

currently planning on only 1 person

#

its for a school project

#

but having it for multiple people wouldnt hurt

late cobalt
#

ah

#

right now ur looping all players

#

so if theres two players one zombie death will -2 from {zombie}

#

and both players will get money

charred kernel
#

yea

#

idk how to change that though

#

rn the most important thing is fixing that it spawns correctly though

#

same y level and 14-18 blocks away

late cobalt
#

is the area flat or na

charred kernel
#

yea

late cobalt
#

then dont bother with while y coord of {_loc1} is not y coord of {_loc}:

#

just set ur y coord for zombie spawn

charred kernel
#

is there a way to make set {_loc1} to a random element out of blocks in radius 18 of {_loc}
only set z and x

late cobalt
#

oh nvm

charred kernel
late cobalt
#

i just realised

charred kernel
#

what did you realise

late cobalt
#

radius is scanning in a sphere right

charred kernel
#

yeah

#

?

late cobalt
#
              set {_loc1} to a random element out of blocks in radius 18 of {_loc}
            while distance between {_loc} and {_loc1} is less than 14:
              set {_loc1} to a random element out of blocks in radius 18 of {_loc} <--- This overrides y-coord from above```
charred kernel
#

yeah I got that

late cobalt
#

ok then u know how to fix right

charred kernel
#

bruh

#

it was this easy all along

#

(i know how to fix it from the code u sent but quickly deleted lol)

#

it works now tysm

late cobalt
#

wait what

charred kernel
#

u sent code and put while in while but quickly deleted it right?

late cobalt
#

what did i send and delete 💀

#

it was just ur code

charred kernel
#

huh

late cobalt
#

so whats ur code now?

charred kernel
#
              set {_loc1} to a random element out of blocks in radius 18 of {_loc}
              while distance between {_loc} and {_loc1} is less than 14:
                set {_loc1} to a random element out of blocks in radius 18 of {_loc}```
late cobalt
#

ye

#

oh lmao i just realised

charred kernel
#

damn

late cobalt
#

when i copied the indentation was broken

charred kernel
#

it worked for some waves but now it didnt work for 1

late cobalt
#

but that was the actual answer LMAO

charred kernel
late cobalt
#

btw u can make it simplier

charred kernel
#

it works

#

so no reason to make it simpler tbh

#

uh

#

nvm

#

it doesnt work

late cobalt
#

lmao

charred kernel
#

it worked for 3 waves

#

and last wave it had 1 {zombie} left

#

and this wave it has 4 {zombie} left

#

now im gonna figure out how to make this work for coop

charred kernel
late cobalt
#

isntead of the while loop to check y coord

#

just do

#
    set {_loc1} to a random element out of blocks in radius 18 of {_loc}
    set y-cord of {_loc1} to y-cord of {_loc}```
charred kernel
#

ah yes

#

ty

#

im very confused on why it doesnt work now

#

1 sec lemme test it from the start of the game

#

first wave its supposed to spawn 8

#

it only spawns 2

#

so something with the spawning is still wrong

charred kernel
#

set y-coord of {_loc1} to y-coord of {_loc}

late cobalt
#

what does error look like?

#

try set {_loc1}'s y-coord to {_loc}'s y-coord

charred kernel
#

im even more confused rn

#

nvm

#

still doesnt work

charred kernel
#

I have no idea how to do this

#

do you have any idea?

#

all I want is a wave system that spawns zombies and progressively spawns more

uneven mirage
#

And that way it’s circular not spherical so its more even

charred kernel
#

set {_loc1} to a random element out of blocks in radius 18 of {_loc} where input's y-coord = ...

#

that?

charred kernel
uneven mirage
#

You can put a condition in the same line as the loop

#

loop all players in radius 5 around {_loc} where [input’s tool is a diamond]:

#

Input is what youre looping; player entity block whatever

#

So you can filter out blocks that are not on the same y-level

#

where [input’s y-coord = {_loc}’s y-coord]:

charred kernel
#

its been a while but im back at this

charred kernel
uneven mirage
#

Um

#

That’s literally the syntax

charred kernel
#

but thats only for looping right?

#

I currentky have

loop {zombie} times:
set {_loc} to loop-value-2
set {_loc1} to a random element out of blocks in radius 12 of {_loc}

#

but no idea how to change that so its in a 8-12 block radius at the same y level

charred kernel
#

@uneven mirage

brisk folio
#

Ok

charred kernel
#

I assume you dont want ALL the code but just this part of the code

#

#on death of zombie:

if {started} is 1:

loop all players:

loop {goldblock::%loop-player's uuid%::*}:

remove 1 from {zombie}

add 50 to {gold::%loop-player's uuid%}

broadcast "%{zombie}%"

if {zombie} = 0:

wait 10 seconds

add 1 to {wave}

send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds

set {zombie} to ({wave} * 4)

loop {zombie} times:

brisk folio
#

The part that's not working

#

What the

charred kernel
#

wait

brisk folio
#

Use code format please.

charred kernel
#

the # is messing it up

brisk folio
#
#on death of zombie:
#  if {started} is 1:
#    loop all players:
#      loop {goldblock::%loop-player's uuid%::*}:
#        remove 1 from {zombie}
#        add 50 to {gold::%loop-player's uuid%}
#        broadcast "%{zombie}%"
#        if {zombie} = 0: 
#          wait 10 seconds
#          add 1 to {wave}
#          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
#          set {zombie} to ({wave} * 4)
#          loop {zombie} times:
#

Ok there

charred kernel
#

oh yea

brisk folio
#

So what does not work

charred kernel
#

so

#

after loop zombie times I want it to spawn {zombie} zombies in a radius of 8-12 blocks on the same y level as {goldblock::%loop-player's uuid%::*}

midnight sand
#

Why the #? Just asking

charred kernel
#

The code didnt work and gave lots of errors, so I just completely blocked it out and continued on other parts of the game im creating

midnight sand
#

Oh ok

brisk folio
#
loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
    if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
        spawn {zombie} zombie at loop-block
        remove 1 from {zombie}
        if {zombie} is 0:
            exit loop

Like that?

charred kernel
#

If I understand correctly this will spawn {zombie} zombies at loop block, so if {zombie} is 11 it will spawn 11 zombies at the loop block and then remove only 1 from zombie

#

Or am I wrong there

brisk folio
#

Yeah

charred kernel
#

I want it to be like a wave of zombies

brisk folio
#

It would be wave though

#

You can change it to spawn 1 zombie at loop-block

charred kernel
#

Ill give context. It has like waves of zombies and then after a wave is done it waits 10 seconds and spawns a little more zombies then the last wave and they all pathfind to {goldblock::%loop-player's uuid%::*} (still gotta figure out how to do that)

charred kernel
brisk folio
#

Oh

#

Add a delay then

charred kernel
#

Already did

#
  if {started} is 1:
    loop all players:
      loop {goldblock::%loop-player's uuid%::*}:
        remove 1 from {zombie}
        add 50 to {gold::%loop-player's uuid%}
        broadcast "%{zombie}%"
        if {zombie} = 0: 
>>>>>>>>**wait 10 seconds**<<<<<<<<<<<<<
          add 1 to {wave}
          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
          set {zombie} to ({wave} * 4)
          loop {zombie} times:```
#

it has a delay of 10 seconds between each wave

brisk folio
#

The way you're doing isn't really efficient

#

You kinda making it more complicated

charred kernel
#

Im not that good at skript

#

What would you recommend me to change it to?

brisk folio
#

Does each player have more than 1 gold block?

charred kernel
#

no

#

Its currently not even made for multiplayer

#

id have to change a lot to make it work

brisk folio
#

I see

#

Why're you making the variable {goldblock... as a list?

charred kernel
#

Good point, no idea

#

Does it make a big difference?

brisk folio
#

It's just unwanted in this case

charred kernel
#

I see that yeah

brisk folio
#

Is that the full code for the death event?

#

I could investigate more

charred kernel
#

Do you want me to send everything? like also everything i tried

brisk folio
charred kernel
#

btw I tried your code and this is just not spawning any zombies:

  if {started} is 1:
    loop all players:
      loop {goldblock::%loop-player's uuid%::*}:
        remove 1 from {zombie}
        add 50 to {gold::%loop-player's uuid%}
        broadcast "%{zombie}%"
        if {zombie} = 0: 
          wait 10 seconds
          add 1 to {wave}
          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
          set {zombie} to ({wave} * 4)
          loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
            if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
              spawn zombie at loop-block
              remove 1 from {zombie}
              if {zombie} is 0:
                exit loop```
charred kernel
# brisk folio Just the full code of this event

its REALLY messy but this is the code with everything i tried to make it work:

#  if {started} is 1:
#    loop all players:
#      loop {goldblock::%loop-player's uuid%::*}:
#        remove 1 from {zombie}
#        add 50 to {gold::%loop-player's uuid%}
#        broadcast "%{zombie}%"
#        if {zombie} = 0: 
#          wait 10 seconds
#          add 1 to {wave}
#          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
#          set {zombie} to ({wave} * 4)
#          loop {zombie} times:
#            set {_loc} to loop-value-2
#            set {_loc1} to a random element out of blocks in radius 18 of {_loc}
#            while true:
#              if:
#                distance between {_loc} and {_loc1} is less than 14
#                y coord of {_loc1} is not y coord of {_loc}
#              then:
#                set {_loc1} to a random element out of blocks in radius 18 of {_loc}
#              else:
#                spawn zombie at {_loc1}
#            while true:
#              if:
#                distance between {_loc} and {_loc1} is less than 14
#                y coord of {_loc1} is y coord of {_loc}
#              then:
#                set {_loc1} to a random element out of blocks in radius 18 of {_loc}
#              else:
#                set {_loc1} to a random element out of blocks in radius 18 of {_loc}
#                wait 5 second
#            if:
#              y coord of {_loc1} is y coord of {_loc}
#              distance between {_loc} and {_loc1} is more than 14
#            then:
#              spawn zombie at {_loc1}```
brisk folio
#
on death of zombie:
  if {started} is 1:
    loop all players:
      remove 1 from {zombie}
      add 50 to {gold::%loop-player's uuid%}
      broadcast "%{zombie}%"
      if {zombie} = 0: 
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
          if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
            spawn zombie at loop-block
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop

Ok here better version

#

Also the code of course won't work

#

Guess why? Look at the condition if {zombie} = 0

#

What is this for?

#

Oh nevermind

#

I understand now

charred kernel
brisk folio
#
on death of zombie:
  if {started} is 1:
    loop all players:
      remove 1 from {zombie}
      add 50 to {gold::%loop-player's uuid%}
      broadcast "%{zombie}%"
      if {zombie} = 0: 
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        broadcast {zombie}
        loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
          if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
            broadcast "&cSpawned Zombie"
            spawn zombie at loop-block
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop

#

Try this and tell what does it broadcast

charred kernel
#

I was already trying the same thing, but I was dumb I named it all a

#

ill check thjat

brisk folio
#

Btw that will make the player continue to next wave each time he kill ONE zombie

charred kernel
#

it broadcasted nothing

brisk folio
#

is {started} = 1?

charred kernel
#

the waves are working and the killing is working and the titles are working only the spawning isnt

charred kernel
#

that basically means the game has started

brisk folio
#
on death of zombie:
  if {started} is 1:
    loop all players:
      remove 1 from {zombie}
      add 50 to {gold::%loop-player's uuid%}
      broadcast "%{zombie}%"
      if {zombie} = 0: 
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        broadcast "Zombies: %{zombie}%"
        loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
          if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
            broadcast "&cSpawned Zombie"
            spawn zombie at loop-block
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop
charred kernel
#

lemme change the zombie rq and see if it works

#

damn ty

brisk folio
#

What does this broadcast?

charred kernel
#

yeaa

#

it broadcasts the zombies

brisk folio
#

Does it spawn though?

charred kernel
#

nah

#

and also doesnt broadcast "&cSpawned Zombie"

brisk folio
#

Ok I see

charred kernel
#

ig the loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
isnt working

brisk folio
#
on death of zombie:
  if {started} is 1:
    loop all players:
      remove 1 from {zombie}
      add 50 to {gold::%loop-player's uuid%}
      broadcast "%{zombie}%"
      if {zombie} = 0: 
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        broadcast "Zombies: %{zombie}%"
        broadcast "%{goldblock::%loop-player's uuid%}%"
        loop all blocks in radius 5 around {goldblock::%loop-player's uuid%}:
          if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
            broadcast "&cSpawned Zombie"
            spawn zombie at loop-block
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop
#

We can check if it set or not

charred kernel
#

<none>

#

lemme check the code for that

#

hmm

#

something is going very wrong

#

the variable isnt set anywhere else in the code

#

1 sec

#

oh nvm thats because its loop-player

#

ohhh

#

its because its set as " add location of event-block to {goldblock::%player's uuid%::*}"

#

changed the code to this

#

Your probably not gonna like it and want me to changhe it but it broadcasts something now:

on death of zombie:
  if {started} is 1:
    loop all players:
      loop {goldblock::%loop-player's uuid%::*}:
        remove 1 from {zombie}
        add 50 to {gold::%loop-player's uuid%}
        broadcast "%{zombie}%"
        if {zombie} = 0: 
#          wait 10 seconds
          add 1 to {wave}
          send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
          set {zombie} to ({wave} * 4)
          broadcast "Zombies: %{zombie}%"
          broadcast "%loop-value-2%"
          loop all blocks in radius 5 around loop-value-2:
            if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
              broadcast "&cSpawned Zombie"
              spawn zombie at loop-block
              remove 1 from {zombie}
              if {zombie} is 0:
                exit loop```
brisk folio
brisk folio
#

List variable isn't needed

uneven mirage
#

Sorry i was busy

#

Did you get the input woking

charred kernel
#

this code is probably way more optimized then the code I had before, but it actually works kinda worse

#

rn after the zombies are spawned it sets {zombie} to 0 although {zombie} is supposed to be the amount of zombies currently alive

#

got that to work using this

        set {zmombie} to {zombie}
        loop all blocks in radius 13 around {goldblock::%loop-player's uuid%}:
          if y-coord of loop-block is equal to y-coord of {goldblock::%loop-player's uuid%}:
            broadcast "&cSpawned Zombie"
            spawn zombie at loop-block
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop
        set {zombie} to {zmombie}```
brisk folio
#

Time to use temp vars

charred kernel
#

it all works good now, except for that it spawns like this

brisk folio
#
set {_zombie} to {zombie}
...
remove 1 from {_zombie}
if {_zombie} is 0:
    exit loop
charred kernel
#

every wave is just a line of zombies instead of a circle around the block

charred kernel
#

white is what its supposed to be, orange is what it is

brisk folio
#

Maybe change the condition to

          if rounded y-coord of loop-block is equal to rounded y-coord of {goldblock::%loop-player's uuid%}:
#

Or maybe because the radius is too much

#

Try looping in lesser radius like 3?

#

And check if it go in circle shape

charred kernel
#

alright ill try 3

#

ill reset the waves then tho

#

oops

#

didnt have time

brisk folio
#

Lol

#

Is that what you want it to be?

charred kernel
#

no

#

1 sec

#

I want it to be in a 10-20 block radius

brisk folio
#

OK lets use vectors

charred kernel
#

I used that once before

#
    loop all players:
        loop {placed::turrets::%loop-player's uuid%::*}:
            set {_player} to loop-player
            loop all mobs in world of {_player}:
                if loop-entity-2 is arrow:
                    stop
                if loop-entity-2 is small fireball:
                    stop
                if loop-entity-2 is not {_player}:
                    set {_vector} to vector between loop-value-2 and loop-entity-2
            shoot an arrow from loop-value-2 with speed 0.6 {_vector}```
#

Thats unrelated to this tho

brisk folio
#

You want it to be in circle shape don't you?

#

So the circle isn't filled

#

Only the edges of the circle are filled

charred kernel
#

id prefer the circle to be filled

#

but if thats not possible edges are also fine\

brisk folio
charred kernel
#

yeah yeah

#

I mean like spreaded out in the "walls" of the circle

brisk folio
#

For example it need 120 zombie to be filled but you're spawning only 20

charred kernel
#

testing out what it does at wave 50

#

at wave 50 it just spawns a circle

#

like a complete circle of zombies

brisk folio
#
                    set {_zombie} to {zombie}
                    loop (180 * 10) times:
                        set {_v} to spherical vector radius 10, yaw (loop-value*2*10), pitch 0
                        spawn zombie at {goldblock::%loop-player's uuid%} ~ {_v}
                        remove 1 from {_zombie}
                        if {_zombie} is 0:
                            exit loop

Try this

#

Fix the indentions though

charred kernel
#

indentions?

brisk folio
#

Nvm

charred kernel
#

tbh

#

I dont understand this code

#

and also have no idea where to place it

#
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        broadcast "Zombies: %{zombie}%"
        broadcast "%{goldblock::%loop-player's uuid%}%"
        set {zmombie} to {zombie}
        loop all blocks in radius 13 around {goldblock::%loop-player's uuid%}:
          if rounded y-coord of loop-block is equal to rounded y-coord of {goldblock::%loop-player's uuid%}:
            broadcast "&cSpawned Zombie"
            spawn zombie at loop-block
            wait 1 tick
            remove 1 from {zombie}
            if {zombie} is 0:
              exit loop
        set {zombie} to {zmombie}```

where in this do I place the code?
charred kernel
brisk folio
#

It just generate circle of radius 10

#

As you see if it spawned the required amount of zombies it will stop

#

You could change the radius though

brisk folio
# charred kernel and also have no idea where to place it
      if {zombie} = 0: 
        wait 10 seconds
        add 1 to {wave}
        send title "&8» &c&lWave %{wave}%" to attacker for 3 seconds
        set {zombie} to ({wave} * 4)
        broadcast "Zombies: %{zombie}%"
        broadcast "%{goldblock::%loop-player's uuid%}%"
        set {_zombie} to {zombie}
        loop (180 * 10) times:
            set {_v} to spherical vector radius 10, yaw (loop-value*2*10), pitch 0
            spawn zombie at {goldblock::%loop-player's uuid%} ~ {_v}
            remove 1 from {_zombie}
            if {_zombie} is 0:
                exit loop

Like that

charred kernel
#

Can't understand this condition/effect: set {_v} to spherical vector radius 10, yaw (loop-value210), pitch 0

#

UHH

#

it just spawned a ton of zombies and {zombie} is at -1275

#

oh no

#

I messed upp

#

alright I got the old code back

#

I accidently deleted a lot of code

charred kernel
#

first I got 2 errors and then it spawned 1,2k zombies

brisk folio
#

What errors?

charred kernel
#

and for some reason the exit loop was wrong

brisk folio
#

Ok lemme try

charred kernel
#

nvm i see what the problem was with exit loop

#

i was supposed to delete 4 spaces but only deleted 2

brisk folio
#

Lol ok

charred kernel
#

so thats mb

brisk folio
#

How many loops are there?

charred kernel
#

loop all players

loop all blocks

#

alright

#

OMG

#

IT WORKSSS

#

ima try wave 50

#

it spawns in like groups of zombies, but it works so im not complaning

#

complaining

#

tysm

charred kernel
#

alright 1 second

#

the single zombies you see are just lots of zombies in 1 spot

#

now its time to figure out how to make them pathfind

#

brb

brisk folio
#

There's an effect for that

charred kernel
#

back

#

cant seem to make it pathfind to the variable {goldblock::%loop-player's uuid%}

charred kernel
#

yea i have no idea how to make it pathfind

brisk folio
#

What did you try

charred kernel
#

lots of different things

#

most just trying to make {goldblock::%loop-player's uuid%} work

#

{goldblock::%loop-player's uuid%} is x: .., y: .., z:..., yaw: 0, pitch: 0 in 'world'

#

thats how its noted

#

any chance you know how to make this work?

brisk folio
#

Gotta use a while loop in a separated function and wait a delay of 2 seconds in the loop then set path target of the zombie to the location

https://skripthub.net/docs/?id=9479

smoky birch
#

use skbee, and as DSA said, have a loop
if you tell it to pathfind only once, it's gonna do that but then the zombie might decide to stop

charred kernel
#

currently trying it

#

it workssss

#

tysm everyone that helped me with this

charred kernel
#

is there a way to stop mobs from jumping?

charred kernel
#

currently have

#
    while event-entity is alive:
        push event-entity downwards at speed 0.5
        wait 1 tick```
#

it works

#

if u have something better lmk

buoyant imp
#

Ii smel free code

#

Jk

brisk folio
buoyant imp
#

On jump

#

If entity is a zombie. Amsd "yay" cancer

#

Cancel

brisk folio
#

On jump is called for players

buoyant imp
#

Ah

brisk folio
#

Use on entity jump

charred kernel
charred kernel
uneven mirage
#

on jump

charred kernel