lower_left = locate(owner.x - 1, owner.y + 1, owner.z)
upper_right = locate(owner.x + 1, owner.y + 3, owner.z)
lower_left = locate(owner.x - 1, owner.y - 3, owner.z)
upper_right = locate(owner.x + 1, owner.y - 1, owner.z)
lower_left = locate(owner.x - 3, owner.y - 1, owner.z)
upper_right = locate(owner.x - 1, owner.y + 1, owner.z)
lower_left = locate(owner.x + 1, owner.y - 1, owner.z)
upper_right = locate(owner.x + 3, owner.y + 1, owner.z)
for(var/turf/affected_tile in block(lower_left, upper_right)) //everything in the 2x3 block is found.
affected_tile.Shake(4, 4, 2 SECONDS)
for(var/i in affected_tile)
var/atom/movable/affected = i
if(!ishuman(affected) && !istype(affected, /obj/item) && !isdroid(affected))
affected.Shake(4, 4, 20)
if(ishuman(affected)) //if they're human, they also should get knocked off their feet from the blast.
var/mob/living/carbon/human/H = affected
if(H.stat == DEAD) //unless they are dead, then the blast mysteriously ignores them.
H.apply_effects(1, 1) // Stun
shake_camera(H, 2, 1)
var/throwlocation = affected.loc //first we get the target's location
for(var/x in 1 to 6)
throwlocation = get_step(throwlocation, owner.dir) //then we find where they're being thrown to, checking tile by tile.
affected.throw_at(throwlocation, 6, 1, owner, TRUE):
Hello so i'm trying to contribute to an ss13 project i like, i am trying to make an Aoe knockback ability where Z or owner is in the center and everything around it within 5x5 us knocked away.
I have been looking at code to do with this trying to get hints but they are all written differently and i don't want to copy paste.i'v attatched an imgur link for anyone who wants to see an image of what i need. help would really be appreciated, Thank you!
Edit: also note i am dum :( so please use laymans explaining.
Copyright © 2022 BYOND Software. All rights reserved.