actor *whose*

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

actor *whose*

Postby Kalladdolf » Mon May 12, 2008 7:03 pm

having a question. (tell me if it was stupid)
for example I wanna destroy an actor WHOSE health is less than 1.
the thing is: the actor isn't supposed to destroy itself, something else does.
and it's gotta be a specific actor outta many clones.
so the code I would need would be something like:
Code: Select all
DestroyActor("Cloneactor");-->//whose health is less than one.

maybe I picked a wrecked example, it also should work with MoveTo, drawing lines to actors, but always the clones which you have picked before.
got it?
:?
:wink:
xD
PS: srry
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: actor *whose*

Postby makslane » Tue May 13, 2008 12:13 am

If you know the clone index, try:

Code: Select all
char sActor[64];

sprintf(sActor, "Cloneactor.%d", cloneindex);
DestroyActor(sActor);
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: actor *whose*

Postby Bee-Ant » Fri May 16, 2008 1:09 pm

Well, I have other idea... not really simple, but easy to understand for even newbie
1. make "checker" actor same size with your view
2. AnimationFinish>checker>Destroy Event actor
3. Enemy>Collision>checker
Code: Select all
if(health<1)
{
     DestroyActor("Event Actor");
}

4. Player>Keydown or something>Create Actor>checker>parrented with view>set the x and y position to be half of your x and y view size
5. checker>CreateActor>VisibilityState>Dont Draw Only
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest