command /backstab:
permission: skript.example.broadcast
trigger:
set {_playerLocation} to location of event-player
set {_offsetVector} to vector -2, 0, 0 # Move 2 blocks backward on X-axis
set {_spawnLocation} to {_playerLocation} add {_offsetVector}
spawn a zombie at {_spawnLocation}
# Play cave ambient sound at player's location
play sound "AMBIENT_CAVE" at player's location```
#How to make zombie spawn behind the player
1 messages · Page 1 of 1 (latest)
It's not working properly and it will make the ambient cave sound but it wouldn't spawn the zombie behind the player that executed the command
add -> with offset
like in blocks or?
{_playerLocation} ~ {_offsetVector}
?
thats how you offset a location by a vector
in what line, sorry still learning
the line
line 6, iirc
I was telling you to replace add with with offset, but you can also just use ~
you can't add a number to a location, that just doesn't make sense
like this?
you forgot the {} around your variable
oh okay
and it's with offset, not just with
sorry it's my first time in 4 years that I use skript
set {_spawnLocation} to {_playerLocation} with offset {_offsetVector}