Grouping actors

Non-platform specific questions.

Grouping actors

Postby lverona » Mon Jan 19, 2015 12:14 pm

Hey everyone!

From what I understand right now, there is no way to group actors. Here's what I mean - say you create a square (that is actually going to do colliding) and then you create a character animation actor. This is often better to do because a square object will be more robust, where as character object will get its hands and feet stuck in other objects and its not very reliable.

Anyway, if both object are unique, then fine. But if we are talking about enemies in the game, of which several clones are created, it looks like we are not able to connect one clone to the other in any meaningful way.

For instance, you shoot at the square object. It notices the collision. Now you need to destroy it, but how do you destroy the associated character object? You can, of course, use a parent/child relationship, though this is not always wanted. And perhaps destroy all children of the object (is it even possible?)

But maybe there is some other method I am missing here?
lverona
 
Posts: 221
Joined: Tue Apr 24, 2012 11:54 am
Score: 1 Give a positive score

Re: Grouping actors

Postby bat78 » Thu Jul 30, 2015 1:24 pm

Aha, you are greatly missing a number of methods.

For instance, on collision event you can do:
Code: Select all
DestroyActor("Collide Actor");

or
Code: Select all
DestroyActor(collide.clonename);

Other ways involve obtaining a pointer to the specified actor using getAllActorsInCollision or getclone or getclone2 (since gE1.4.1b) or getactor or CreateActor depending what exactly you need to do.
The future of "Game-Editor" here
User avatar
bat78
 
Posts: 816
Joined: Sun Dec 14, 2008 9:13 pm
Location: Bulgaria, Sofia
Score: 88 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron