phyzix5761 wrote:Check the z-depth of the collision box for the control button. You may have to mess with it depending on how you have the mouse button down event triggered.
happyjustbecause wrote:
UFO.r = 50;
int i;
Actor * a; //This is GE's built in pointer for actors, you can search more information about it from documentation or forum
char nameOfClone[256];
for (i = 0; i < highestIndex; i ++)
{
sprintf(nameOfClone, "UFO.%i", i); //This will set string 'nameOfClone' to contain the clonename of the i numbered clone.
//EXAMPLE: i = 5 ---> nameOfClone = "UFO.5"
a = getclone(nameOfClone); //With the string we just made, get the pointer to the clone and store it to 'a'.
//And now just change the r, g and b values
a->r = 156;
a->g = 255;
a->b = 0;
//Note that you can't use a.r here, because 'a' is not an actor, it is pointer to actor. That's why you have to use a->r
}
lcl wrote:Wow! This game just keeps getting better and better!
The graphics are very impressive and the menu style that you use is also professional, I like it!
And the color change effect is very nice too.
I could help you with those UFO's not changing their color.
It's simple. When you try to recolor clones you can't just write like:
- Code: Select all
UFO.r = 50;
Because that only changes the color of the clone that has the lowest cloneindex.
What you could do is to have a variable that holds the highest cloneindex and then when you want to change the color you'd do a for loop
which goes through all the clones and changes their r, g and b values.
Something like this: (you need to change it in order to make it work in your case)
- Code: Select all
int i;
Actor * a; //This is GE's built in pointer for actors, you can search more information about it from documentation or forum
char nameOfClone[256];
for (i = 0; i < highestIndex; i ++)
{
sprintf(nameOfClone, "UFO.%i", i); //This will set string 'nameOfClone' to contain the clonename of the i numbered clone.
//EXAMPLE: i = 5 ---> nameOfClone = "UFO.5"
a = getclone(nameOfClone); //With the string we just made, get the pointer to the clone and store it to 'a'.
//And now just change the r, g and b values
a->r = 156;
a->g = 255;
a->b = 0;
//Note that you can't use a.r here, because 'a' is not an actor, it is pointer to actor. That's why you have to use a->r
}
I hope that helps. If you have any questions, don't hesitate to ask.
Actor * a;
char nameOfClone[256]
char UFO[50]
Green_Down -> MouseButtonDown (Left), line 8 : READ attempted beyond allowed access area
a = getclone(UFO_cname);
Actor * a;
myActor.2.r = 30;
Users browsing this forum: No registered users and 1 guest