Very new here and to coding, thanks for all the support so far on the IRC and whatnot!
I have a code in alien_powers that tries to throw_very_fast a minibomb. In that code, you have neurotoxin, which used code to determine which way the character is face, and shoots the neuro one step away from them, assumably to avoid hitting the xeno, like mine is currently doing.
The problem is, I cannot find how to implement the same type of code.
Code: Select all
/obj/effect/proc_holder/alien/wad
name = "Spit Explosive Wad!"
desc = "Spits an explosive wad. Pretty stupid."
plasma_cost = 50
action_icon_state = "alien_neurotoxin"
/obj/effect/proc_holder/alien/wad/fire(atom/target,mob/living/carbon/user = usr)
user.visible_message("<span class='danger'>[user] Spit Wad!</span>", \
"<span class='danger'>You Spit the Wad!</span>")
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
if(!isturf(U) || !isturf(T))
return 0
var/obj/item/weapon/grenade/F = new /obj/item/weapon/grenade/syndieminibomb(user.loc)
F.current = U
F.yo = U.y - T.y
F.xo = U.x - T.x
F.throw_at_fast(target, 30, 2,U)
spawn(15)
F.prime()
As you can see, I borrow the code from neurotoxin just below this in the script. It returns undefined variables for F.current,.xo and .yo.
I've tried searching git and asking on IRC, people seem busy so I will put this here and see if some kind soul can help explain how to make this system work!
Thanks again.