Mouse_ent not working - Help

Posted By: oriongu

Mouse_ent not working - Help - 06/24/07 14:38

Hello,

Sorry to ask such a noob question but this is driving me mad , i just cant get mouse_ent to work.

heres my test code :

Code:

var video_mode = 6; // screen size 800x600
var video_screen = 1;
bmap pcxArrow = <arrow.pcx>;
string world_str = <tets.wmb>;
font standard_font = "ackfont.pcx", 6, 9;
string str_souris;

var mouse_mode = 2;

text txt_souris_x
{
pos_x = 400;
pos_y = 60;
font standard_font;
string str_souris;
flags = VISIBLE;
}


function main()
{
MOUSE_MAP = pcxArrow;
mouse_range = 5000;
level_load(world_str);

wait(1);

display_info();
camera_move();


}


function display_info()
{
while(1)
{
MOUSE_POS.X = POINTER.X;
MOUSE_POS.Y = POINTER.Y;
str_cpy(str_souris, "La souris est sur : ");
if(mouse_ent)
{
str_cat(str_souris, mouse_ent);
}

wait(1);
}
}

function camera_move(){

while (1){
if (mouse_right){
camera.x += mickey.y;
camera.y += mickey.x;
}
wait(1);
}
}



Posted By: nipx

Re: Mouse_ent not working - Help - 06/24/07 15:19

mouse_ent isnt a string, its a pointer to an ent.

==>>

Code:

if(mouse_ent)
{
you=mouse_ent; //skill 30 contains your ent's name
temp_str = you.skill30; //not sure about this, havent worked with gstudio for long time...
str_cat(str_souris, temp_str);
}






nipx
Posted By: oriongu

Re: Mouse_ent not working - Help - 06/24/07 15:42

Hello, thanks for your reply.

But engine says to me : Empty pointer in (str_cat(str_souris, mouse_ent.skill30))

By the way , where did you find that skill30 in the manual?

Thanks
© 2024 lite-C Forums