entering an area

Posted By: Marky Mark

entering an area - 07/16/06 18:42

Hi,

I'm trying to make rain falling under a cloud. Here's my idea:

Place unvisible box under the cloud. When the player enters the box, activate the rain (I got the particle effects). When he goes out, stop the effect.

How to do this?

Thanks
Posted By: Excessus

Re: entering an area - 07/16/06 19:27

This is just an idea, I haven't tested it.
Code:

action box
{
my.INVISIBLE = ON;
my.PASSABLE = ON;
my.POLYGON = ON; // if it doesn't work, try c_setminmax(me); or something..
while(!player){wait(1);}
while(1)
{
if(((player.x < my.x + my.max_x) && (player.x > my.x + my.min_x)) && ((player.y < my.y + my.max_y) && (player.y > my.y + my.min_y)) && ((player.z < my.z + my.max_z) && (player.z > my.z + my.min_z))) // Count those brackets ;)
{
// Turn rain on.
}
else
{
// Turn rain off.
}
wait(1);
}
}


Posted By: Marky Mark

Re: entering an area - 07/16/06 20:05

Working! thanks
© 2023 lite-C Forums