hi again,
today i have a question about dynamic light.
I want to go up to an object, press the space bar, and then a dynamic light appers and stays there (same position as the object).
i have the following codes, but i cant mix them together bcs my dymic light is an action and i cant add an action to an action..
Codes:
action make_light
{
while (!player) {wait (1);}
while (1)
{
// if the player comes close to the object
if (vec_dist(player.x, my.x) < 80) // play with 100
{
if (key_space)
{
while (key_space) {wait(1);}
//
//wait (1);
// wait until the space key is released
// HERE SOULD BE THE FUNCTION OR WATEVER FOR THE DYNAMIC LIGHT (Below)
ent_remove (me); //do i need that here?
}
}
wait (1);
}
}
action sudden_light
{
my.invisible = on;
my.passable = on;
my.cast = on;
my.light = on;
my.lightrange = 200; //light range
my.red = 5;
my.green = 5;
my.blue = 5;
}
how can i make this work? Thanks!