Hi, I've built a level in WED using prefab units, each unit combining walls, floor, and ceiling. When I connect these units, corridors that run perpendicular to one another are made. There is one sprite that is not initially visible to a player because it is hidden around a corner in another corridor. I'm trying to use c_trace so that a text message will appear once the sprite is visible and comes within range, however, the event is triggered without the aforementioned being true. Here is my code:
STRING* imp_str = "Got imp";
TEXT* imp_txt =
{pos_x = 100;
pos_y = 50;
string = imp_str;
}
ENTITY* Imp_ent;
action Imp_act()
{Imp_ent = my;}
action player_move()
{player = my;
while (1)
{camera_view.pan = player.pan;
camera_view.x = player.x;
camera_view.y = player.y;
c_trace(player.x, Imp_ent, USE_BOX + IGNORE_ME);
if (you = Imp_ent)
{ imp_txt.flags = VISIBLE;
}
wait(1);
}
}
The message, "Got Imp" displays at the beginning once the level loads, but the Imp model is not visible because the prefab level units are in the way.
Pseudocode: If you = Imp_ent in the c_trace command, make the message visible even if the Imp_ent is not visible.
Either I'm missing the c_trace command logic or c_traces around other entities.
Please help.