creator actor

Game Editor comments and discussion.

creator actor

Postby d-soldier » Wed Jul 11, 2007 8:27 pm

.. Some functions in GE (such as CHANGE PARENT) allow you to select "CREATOR ACTOR", so obviously each actor knows what created it, right? So when scripting (without the easy to use & click interface functions) how would it be scripted? for example, my actor's DRAW script below has it moving along with another actor (which created it) while not being parented (per the parenting problem with independantly rotating actors addressed in my Hull Breach game). The problem is, if two of these actors are on the screen at once, the following actor doesn't know to follow it's creator(.1 in this case) rather then the original (.0) actor... anyone?

int weight = 1;
x = ((weight -1)*x + e_HK.x +10 )/weight;
y = ((weight -1)*y + e_HK.y +15 )/weight;

** in this case "e_HK" needs to be whatever would make it "CreatorActor"...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Wed Jul 11, 2007 11:10 pm

I think its "creator"
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby d-soldier » Thu Jul 12, 2007 12:41 am

+1 to you GOGO... now what about created actors (would be children if they were parented)... How could they be destroyed in a DestroyActor script?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Thu Jul 12, 2007 12:53 am

I do not understand D:
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby d-soldier » Thu Jul 12, 2007 1:17 am

So when the first actor is destroyed, it destroys the actors that it created. (they are not child actors, because there is no parenting involved.)
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Thu Jul 12, 2007 2:41 am

this is not possible, unless you saved in a string what actor it has created.
like:
Code: Select all
char*CreatedActor;
CreateActor("MyActor", "MyAnimation", 0, 0, FALSE);
strcpy(CreatedActor, "MyActor");
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby d-soldier » Thu Jul 12, 2007 6:24 am

Is there a work around for this then? somehow?.. oh, I just figured one out... On the primary actors destroy actor event, I'll have it create an explosion actor which is unique to that object, and on the created actor, any collision with that explosion will destroy it (since it's right there on the other object anyway)... I'm so smart sometimes...
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron