I found a way to show an entity through wall:
PHP Code:
showthroughwall_frame local.entity:
local.entity.origin2 = local.entity.origin
while(((self != NULL && local.entity != NULL) || (self != NIL && local.entity != NIL)) && local.entity.showthroughwall == 1)
{
local.origin = vector_subtract local.entity.origin2 self.origin
local.entity detach self
local.entity attach self "eyes bone" 0 local.origin
if(self == NULL || self == NILL)
{
local.entity detach
end
}
waitframe
}
end
showthroughwall local.player local.entity:
if(local.entity == NIL || local.entity == NULL || self == NIL || self == NULL)
end
local.entity.showthroughwall = 1
local.player thread showthroughwall_frame local.entity
end
setthroughwallentityorigin local.entity local.origin:
local.entity.origin2 = local.origin
end
hidethroughwall local.entity:
local.entity.showthroughwall = 0
end
this works but however, setting angles to the entity will make this one teleport everywhere (because the entity is also based on eyes bone's angles), someone know how to fix it?