Axl Trauts
Member
Hi,
I have a top down shooter and I have this special gun that shoots sticky bombs from above. The should appear at the middle of every enemy instance using its parent par_Enemy.
Each enemy has different origins due to their unique behaviors, so using something like this on the script that fires the sticky bomb, it won't appear on the center of every instance but the ones with 0,0:
I don't want to modify permanently all their origins with sprite_set_offset. If there's no way, I'll have to figure out a different effect.
I have a top down shooter and I have this special gun that shoots sticky bombs from above. The should appear at the middle of every enemy instance using its parent par_Enemy.
Each enemy has different origins due to their unique behaviors, so using something like this on the script that fires the sticky bomb, it won't appear on the center of every instance but the ones with 0,0:
GML:
if !instance_exists(obj_stickybomb)
{ with(par_Enemy)
{ if enemy_type="ALL" // not relevant now
{ instance_create_depth(x+sprite_width/2,y+sprite_height/2,par_Enemy.depth-1,obj_stickybomb);
}
}
}