destroy actor on collision -help-

You must understand the Game Editor concepts, before post here.

destroy actor on collision -help-

Postby pixelpoop » Thu Jul 26, 2007 2:54 pm

Does anybody know what is wrong with my code?

I am trying to make it so when an actor is created it checks to see if it is on top of my background tile actors. If it is then it is supposed to delete itself, but it is not working.
Code: Select all
int qq;
int i;
Actor *actors;

actors = getAllActorsInCollision("Event Actor", &qq);
if(actors)
{
for(i = 0; i < qq; i++)
{
if ( strcmp(actors[i].name, "background_tiles")==1 )DestroyActor("Event Actor");
                        }}

:?:
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score

Postby pixelpoop » Thu Jul 26, 2007 3:16 pm

wait sorry, I got it now.

strcmp(actors[i].name should be strcmp(actors[i].clonename

and also the actor this script is on can't be created on another actor's create actor script, or nothing happens
User avatar
pixelpoop
 
Posts: 276
Joined: Tue Aug 29, 2006 9:32 pm
Score: 28 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest