Page 1 of 1

Quick stupid question

PostPosted: Sun Mar 25, 2007 7:05 pm
by Troodon
I know that I will feel very stupid when I will get the answer but:
how can I (in script editor) make my event when the parent actor gets destroyed? I mean something like this:

if (DestroyActor("parent"))
{
DestroyActor("event actor");
}

Thanks

EDIT: Of course this code doesn't work... :P

PostPosted: Sun Mar 25, 2007 7:45 pm
by makslane
You need to use the 'Destroy Actor' event of the parent actor

PostPosted: Mon Mar 26, 2007 12:40 am
by DilloDude
You could check whether the parent exists:
Code: Select all
if (parent.cloneindex < 0)
{
    DestroyActor("Event Actor");
}

PostPosted: Mon Mar 26, 2007 4:47 pm
by Troodon
Thanks! :D It works like april fool snowball! Here, take one score. :)