Quick stupid question

Non-platform specific questions.

Quick stupid question

Postby Troodon » Sun Mar 25, 2007 7:05 pm

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
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby makslane » Sun Mar 25, 2007 7:45 pm

You need to use the 'Destroy Actor' event of the parent actor
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby DilloDude » Mon Mar 26, 2007 12:40 am

You could check whether the parent exists:
Code: Select all
if (parent.cloneindex < 0)
{
    DestroyActor("Event Actor");
}
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Troodon » Mon Mar 26, 2007 4:47 pm

Thanks! :D It works like april fool snowball! Here, take one score. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest