Page 1 of 1

Parent & Child use in Actor Control?

PostPosted: Wed Mar 24, 2004 3:52 am
by Just4Fun
What is the purpose of Parent and Child in an actor control?

Could a parent actor (cardBack) be made to respond to a child actor (cardFront) events and actions?

TIA

PostPosted: Wed Mar 24, 2004 7:29 am
by phractus
If you set something as the child of something it will move along with it. Thats all i use it for, dont know what else it does...

PostPosted: Wed Mar 24, 2004 9:45 am
by jazz_e_bob
Hi guys. Hope you are well. :)

Could a parent actor (cardBack) be made to respond to a child actor (cardFront) events and actions?


No easy way that I know of. :cry:

:idea: What you want is to be able to refer to an actors parent.

You need a "parent" event actor.

For example:

If I click on the child actor it run a script that reads:
parent.x += 1; // move parent to right

Good idea. :)

( I am also nagging M to include "creator" as an event actor. )

Image

PostPosted: Wed Mar 24, 2004 12:08 pm
by makslane
What is the purpose of Parent and Child in an actor control?


When you move the parent all children will move too

PostPosted: Wed Mar 24, 2004 3:22 pm
by Just4Fun
jazz_e_bob,

What you want is to be able to refer to an actors parent.

You need a "parent" event actor.


I like your idea. Maybe in the next version .... :?:

Now, with one question leading to another, "How would GE handle a mouse down event on the (cardBack) actor so that the actor (cardFront) that is located underneath the actor (cardBack) would run its script?"

Would I use activation Events? (I don't really get their use except how to move another actor). The Checkers Demo is making more sense as I study it, but it is still pretty advanced in C script for my understanding.)

I would like to do another demo (sort of a card type game), but I'm struggling with the psuedo code concepts right now. Am I biting off a little too much to chew for a newbie?

* It's good to know that Mrs. Jazz is home and on the mend. Tell her the women in this group, both young and old, appreciate "her man". My best regards to her (I guess you will be the one to exercise the horse for a while now! :lol:

PostPosted: Wed Mar 24, 2004 3:40 pm
by ingsan
Rachel,

"How would GE handle a mouse down event on the (cardBack) actor so that the actor (cardFront) that is located underneath the actor (cardBack) would run its script?"

why don't you put two annimations per card (one for cardBack and another cardFront)
This way, the code is assigned to both Front and Back without having to ask cardBack to handle an action to cardFront.


PS
Tell her the women in this group, both young and old, appreciate "her man"

Taht's pretty true ! :oops:

PostPosted: Wed Mar 24, 2004 5:28 pm
by Just4Fun
why don't you put two annimations per card (one for cardBack and another cardFront)


Ingsan,

I've thought of that. In fact, I used that approach in the beginning, but I need to generate the face cards to random positions on the screen, then read whether or not they match on another when clicked. Maybe there is a way to do your idea, but I'm not sure how it would be accomplished.

I am just kind of confused about the approach to accomplish the tasks involved. :?

PostPosted: Wed Mar 24, 2004 7:18 pm
by jazz_e_bob
Hmmm...

I need to read more about activation events.

Anyway...

Sounds like you are making a "memory" kind of game.

All cards randomly spread out facing down.

The user flips two cards. If they match they get the cards - and the points.

I agree with ingsan. You should be able to build a "card" actor consisting of a "back" animation and a range of "front" animations.

(That would be the neatest way to do it.)

Once again though, I fear you may need to use local variables to track card value. (animindex when flipped). If you do it globally you will need a new variable for each card you use.

I will try to make a demo later today.

* It's good to know that Mrs. Jazz is home and on the mend. Tell her the women in this group, both young and old, appreciate "her man". My best regards to her (I guess you will be the one to exercise the horse for a while now!


Will pass on your kind words. :)

PostPosted: Wed Mar 24, 2004 11:49 pm
by Just4Fun
Sounds like you are making a "memory" kind of game.

All cards randomly spread out facing down.

The user flips two cards. If they match they get the cards - and the points.



Yes, that is what I am trying to do. It is a relief to know that I can do it using one actor with animations. That should be a little easier.

At least I'll be on the right track. I'll see if I can muddle along.

A demo would be appreciated when/if you get some time. I learn a lot from studying them. Thank you for your help--->again.

PostPosted: Thu Mar 25, 2004 5:45 am
by jazz_e_bob
You know J4F, I'm stumped on this one. :? :oops:

Need more thinking time maybe... :idea: :idea: :idea: :idea:

I have made a card actor (back plus multiple fronts) but I can't work out a way of dealing random, non-repeating cards... yet...

In the mean time, who wants to build the graphics for the default GE card set? You would get a credit for any game that used them! :wink: :wink: :wink: :wink: :wink: :wink:

PostPosted: Thu Mar 25, 2004 9:51 am
by ingsan
mmmmmm.... i'm going to work on that ! Seems to be a very good idea ! :)

PostPosted: Thu Mar 25, 2004 3:24 pm
by Just4Fun
jazz-e-bob:
Thank you for looking at this problem. I "hit a wall " in trying to figure it out. Maybe Makslane will jump in and make some suggestions.
I think a small card demo could be important for GE since there are a gazillion of them out there and people who would buy GE might like to see how one is done.
I would have been happy to help with the graphics but with a professional animator (ingsan) on that already, I'd say you are well covered!
I'll stand ready to help in any way that I can. I'm enjoying this group and I just purchased GE so I'm very committed to its development.
Now, I think I will look around for a little less challenging project to work on. I will be waiting to see what you two come up with! :lol:

PostPosted: Thu Mar 25, 2004 6:50 pm
by jazz_e_bob
ingsan,

http://www.maybanana.com/pantzboi/game_editor/cards.zip

This GED includes a "card" actor with 53 animations ready to roll. i stole them from microsoft solitaire so you may need to "tweak" to avoid copyright issues perhaps... :wink:

PostPosted: Thu Mar 25, 2004 9:57 pm
by ingsan
Yeah Let's Rock the new GE Solitaire PlayCards ! 8)

Thank you jazz-e-bob. I'll try my best ! :wink: