Can't hide an ENITITY in Lite-C?

Posted By: Michael_McCrickard

Can't hide an ENITITY in Lite-C? - 05/14/09 17:12

Why does the entity not hide when it is clicked on? If you have the Lite-C workshops, this is a slightly modified version of the workshop10 script and works with the work10.wmb level.

///////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////

function plane_event()
{
if (event_type == EVENT_CLICK)
{
//this is here only to confirm
//that the event was received
my.z += 50;

//this doesn't hide the entity
reset(me, SHOW);

//...and this doesn't either
//toggle(me, SHOW);
}
}



action rotate_plane()
{
my.emask = ENABLE_CLICK;

my.event = plane_event;
}

function main()
{
mouse_mode = 4;
video_mode = 7;
level_load ("work10.wmb");
vec_set(camera.x,vector(-300, 0, 75)); // place the camera at x = -300, y = 0, z = 50
}
Posted By: darkinferno

Re: Can't hide an ENITITY in Lite-C? - 05/14/09 17:15

use the INVISIBLE flag for entities... set(my,INVISIBLE); to hide, reset(my,INVISIBLE); to show... or toggle(my,INVISIBLE);
Posted By: atari98

Re: Can't hide an ENITITY in Lite-C? - 05/14/09 17:32

Please write in German
Posted By: Michael_McCrickard

Re: Can't hide an ENITITY in Lite-C? - 05/14/09 17:34

Ahhh, thank you. I get it now. They renamed "VISIBLE" (for panels and texts) to be SHOW. But INVISIBLE is still INVISIBLE.
Posted By: Jaxas

Re: Can't hide an ENITITY in Lite-C? - 05/14/09 21:23

Quote:
Please write in German
learn english!
© 2024 lite-C Forums