Page 1 of 1

AllActor variable

PostPosted: Fri Jun 29, 2007 4:43 pm
by Oman
Hello everyone,

Is it possible to make a game where all the actors have the same variable assigned to them, without them being parented.

What i mean is, if i wanted to change the transparency of all my actors that are in my game, but i dont want to make TONS of change transparency events, can i put something like...

Code: Select all
AllActors.transp = 0.5;


in the script editor?

I have been trying to figure this out for ages. Is it even possible to assign a variable to an actor/actors?

Please help :!:

PostPosted: Fri Jun 29, 2007 4:49 pm
by Caaz Games
I dont know, but i got an idea, make a biog black box that will fill the screen, then have it look invisible, then just have it fade back to sight for the dissapearing look. i hope i made sence, i just woke up :).

PostPosted: Fri Jun 29, 2007 4:51 pm
by Oman
well, i would, but i also need to click on something that follows my mouse, and the Zdepth probs would drive me CRAZY! That is wy i was wondering about te all actor var.

Good thought though :D

PostPosted: Fri Jun 29, 2007 5:44 pm
by Oman
I got the zdepth problems sorted out, and it worked! ty CAAZ!

I put this code in the draw actor of my slider

Code: Select all
if(x<-100)x=-100;
else if(x>100)x=100;
y=yprevious;
if(exit==0)
{
    back_black.transp=Brigh_Tone.textNumber/100;
}


back_black is the big black box, and Bright_tone is the number next to the slider.

PostPosted: Fri Jun 29, 2007 6:39 pm
by Caaz Games
You're welcome! :P

P.s. I've changed my user name to "Caaz" It looks better than "__CAAZ__"