the trace should be done in the action script of your ent_created bullet hole sprite entity. you need to store the direction vector to the wall into a temporary vector, then the bullethole action script reads/uses that vector for the direction to trace TO

( best is to take the vector and magnify it with vec_normalize to get your trace end point)


example lets say my bullets don;t bounce off walls, so I can just go ahead and use my bullets relvector movment value for the trace

define move_dist ,skill40; // so ill use skill40 41 and 42 for my move vector
action bullet_move
{
//...
vec_set(my.move_dist,vector(10*time,0,0));
// or as long as I know skill41 and 42 are never set valeus i could just do
// my.move_dist = 10*time; but the above line makes SURE and not assumes
c_move(my,my.move_dist, .....


action bullethole
{
my.passable = on;
// because at the time this entity is created YOU pointer will point back to the bullet entity so we can sue that to grab our movment vector IF we do it right away

vec_set(my.move_dist,YOU.move_dist); // the movment direction vector backed up

vec_normalize(my.move_dist,10); // here i just increased the length of teh vector *10
//now I just do the trace
my.skill10 = c_trace(my.x,my.move_dist,IGNORE_ME+IGNORE_YOU);
// the ignore you is important too. else your still existing bullet entity will stop the trace soon as it starts.
if(my.skill10 >0) // trace hit something
{
my.oriented = on; // look up these to line sin manual if you don't know them
my.facing = off;
vec_set(my.x,TARGET);
vec_to_angle(my.pan,normal);
}
else // no surface to attach to so remove me from the world
{
remove(me);
}




and so forth. there smore to it depending on your intended usage but that should get you in the ballpark of basic sticking sprites to a surface.