text info1
{
pos_x = 4;
pos_y = 10;
layer = 15;
string = "";
flags = visible;
}
entity* Max2_MDL_001;
action displayinfo1
{
Max2_MDL_001 = me;
var i=1;
while(i)
{
if(vec_dist(me.x, plBiped01_entity.x) > 150)
{
info1.string = " ";wait(1);
}
else
{
info1.string = "this text appears when u get near the char";
i=0;
}
}
}
try this.
EDIT:
though it wont work
you said trhe while function only works as long as i is 1. but when you write the text, the while will be closed, so you can't copy back the text ot nothing.
just do
while(1)
{
your code
}
instead of
while(i)
{
your code
}
and dont use i then .
like this:
Code:
action displayinfo1
{
Max2_MDL_001 = me;
while(1)
{
if(vec_dist(me.x, plBiped01_entity.x) > 150)
{
info1.string = " ";
}
else
{
info1.string = "this text appears when u get near the char";
}
}
}