M
MCKOY
Guest
I'm trying to make it so when a character's attack creates a hitbox, it passes a couple things into it which would be different for each character(it's team and damage). Right now, my code will work if I manually enter these figures in the hitbox creation like this.
But I've tried every different way I can think of writing them as variables instead and passing them through but none work.
Code:
if(can_attack == 1)
{
attack_direct = point_direction(x,y, target.x, target.y)
with(instance_create_depth(x+lengthdir_x(range, attack_direct), y+lengthdir_y(range, attack_direct), 0, obj_hbox))
{
team = 2
dmg = 5
}