void clickActors()
{
int i, j;
Actor* centerActor = getclone(center);
Actor * actors;
actors = getAllActorsInCollision("Event Actor", &j);
for (i = j-1; i >= 0; i --) // notice this goes backwards
{
if (strcmp(actors[i].clonename, center) != 0)
{
Actor* a = &actors[i];
int xs = (view.width * 0.5 + ((a->x - centerActor->x) * size));
int ys = (view.height * 0.5 + ((a->y - centerActor->y) * size));
if(abs(xmouse-xs)<(a->width/2*size) && abs(ymouse-ys)<(a->height/2*size))
{
SendActivationEvent(a->clonename);
return; // only click one actor, you can remove this if you want other actors underneath to be clicked
}
}
}
}
luckyshot29 wrote:I'm trying to add an Activation Event Button that needs to hold in order for my player actor to float, how can I do that?
luckyshot29 wrote:I'm trying to add an Activation Event Button that needs to hold in order for my player actor to float, how can I do that?
Users browsing this forum: No registered users and 1 guest