I assume it's got something to do with my Actors and how I'm using them.
The last 2 lines work so they can be ignored.
- Code: Select all
//Actor Vars = Colour and Colour Match
//Actors = Border and ball
//1 - Get All Balls Colliding With Border
//2 -For Each Of The Balls Colliding
//3- Get all balls colliding with the checkball
//4 -For all balls colliding with the checkball check the colour and see if it matches
int i,n;
Actor * TheseBalls =getAllActorsInCollision("Border",&n);//1
for(i=0;i<n;i++) //2
{
int j,m;
int ThisColour;
Actor*CheckBall = getclone2("ball",TheseBalls[i].cloneindex);
Actor*CollidingActor = NULL;
CollidingActor = getAllActorsInCollision("CheckBall",&m);//3
for(j=0;j<m;j++)
{
if(CollidingActor[j].Colour==CheckBall->Colour) //4
CheckBall->ColourMatch++;
}
}
CreateActor("Trigger", "icon", "(none)", "(none)", 10, 205, true);
DestroyActor("Event Actor");