#Spawning Zombies on random red wool (Function)
1 messages · Page 1 of 1 (latest)
And then this is also the first wave:
As you can see it is random
No matter what wave the zombie swill spawn randomly on a random red wool
How would I begin to create this?
(My code so far):
function Wave(n: number, n2: number):
loop all players:
send title "&2Wave &6%{_n}%" to loop-player
spawn {_n2} of zombies # red wool code here
# the command is only for testing purposes it will soon be changed to when a zombie dies so it can check if there is none and will start the next wave.
command /wave:
trigger:
Wave(1, 10)
Spawning Zombies on random red wool (Function)
SKU is gonna give better feedback than here
function Wave(n: number, n2: number, l:location):
loop all players:
send title "&2Wave &6%{_n}%" to loop-player
loop 360 times:
add spherical vector radius 5, yaw loop-value * 8, pitch 0 to {_l::*}
loop {_n2} times:
set {_} to random element of {_l::*}
spawn zombie at {_l} ~ {_}
remove {_} from {_l::*}
# the command is only for testing purposes it will soon be changed to when a zombie dies so it can check if there is none and will start the next wave.
command /wave:
trigger:
Wave(1, 10, player's location)
you could use a spherical vector like i showed here
wait what
?
woah
woah fr
its simple math 
yeah but the variables and vectors are confusin
it wont be a square it'll be a spherical shape
just saying
variables?
lol
your just better
wait
is it possible
to make it when a zombie spawns, it just spawns on a red wool?
a random red wool?
yeah i guess
how would i make the red wool random?
you'd get the locations of the red wool, add to a list then get some random locations of the list
then spawn the zombies at those locations
set {_} to random element of {_l::*}
oh cool
wait
can i only spawn 1 zombie
at the location
and then repeat the code?
sure
all blocks in radius x of y where [input = red wool]
although this would probably be less laggy
and i recommend doing it this way
do it however u want
okay, i'll listen to you
🍇
so just remove it?
no
oh
so whats the best integer?
your smart
loop 360 times:
add spherical vector radius 5, yaw loop-value * 8, pitch 0 to {_l::*}
look
the yaw moves
with the loop
thats how it works
okay
has nothing to do with getting the vectors
whats a spherical vector
a vector
but do you have one?
wats the difference
a tutorial?
in a sec
wait
lemme finish chess gmae
game
ok he resgined
ggs
Hopefully this will be a complete tutorial in vectors within vanilla Skript (might add onto this with Biosphere stuff) Terms you will learn (definitions of each one will be in the tutorial) : Pitch and yaw Vector Magnitude Normalization Location Velocity Basic arithmetic Dot product Cross product...
made by wizard boy
wats the difference between spherical vector and normal vector
round, not round?
there is no difference
oh
a spherical vector just makes getting vectors from a sphere easier
yes
in a spher
yes
yes
wow
if theres no difference then whys it easier
wait does this code, include the red wool?
or
theres no difference in the vector itself
but getting the vector is easier with spherical vectors
how so
because grabbing a spherical vector without using spherical vector expressions would take a lot more lines + effort
with the spherical vector expression it takes 2 lines
function sphere() :: vectors:
loop 360 times:
loop 360 times:
set {_v} to spherical vector radius 1, yaw loop-number-1, pitch loop-number-2
add {_v} to {_vectors::*}
return {_vectors::*}
it doesn't check for red wool
it just grabs the locations in a radius
that radius u can change
this does not make sense
oh
but i see
is this your skript?
u basically said “its easier because its easier!”
i use custom expressions instead of functions
did not
wdym?
i made an rpg and people joined over time to bully my scripting skills and help me
wait really?
wow
those are
nice people
yes
we all did
lol
wats yo server
yo wait
?
deleted
can i friend you? i just wanna y'know ask you tips and stuff whenever you are free or available or have the time
or just message you
https://www.youtube.com/watch?v=_F5gWxEN1qY&ab_channel=finals_
if u wanna look at what i did
Duse please hire me i am good at skript.. maybe
add my main then
i am not on much on this account
gaqb is the main
ok cya
also really cool
im going to bed
thank you for helping
proven otherwise lol.
very nice, an actual boss fight too
thanks