Parent & Child use in Actor Control?

Non-platform specific questions.

Parent & Child use in Actor Control?

Postby Just4Fun » Wed Mar 24, 2004 3:52 am

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
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby phractus » Wed Mar 24, 2004 7:29 am

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...
phractus
 
Posts: 77
Joined: Mon Mar 08, 2004 1:25 am
Location: Rochester, NY, USA
Score: 0 Give a positive score

Postby jazz_e_bob » Wed Mar 24, 2004 9:45 am

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
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby makslane » Wed Mar 24, 2004 12:08 pm

What is the purpose of Parent and Child in an actor control?


When you move the parent all children will move too
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Just4Fun » Wed Mar 24, 2004 3:22 pm

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:
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby ingsan » Wed Mar 24, 2004 3:40 pm

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:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby Just4Fun » Wed Mar 24, 2004 5:28 pm

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. :?
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby jazz_e_bob » Wed Mar 24, 2004 7:18 pm

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. :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby Just4Fun » Wed Mar 24, 2004 11:49 pm

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.
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby jazz_e_bob » Thu Mar 25, 2004 5:45 am

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:
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Thu Mar 25, 2004 9:51 am

mmmmmm.... i'm going to work on that ! Seems to be a very good idea ! :)
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby Just4Fun » Thu Mar 25, 2004 3:24 pm

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:
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby jazz_e_bob » Thu Mar 25, 2004 6:50 pm

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:
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Thu Mar 25, 2004 9:57 pm

Yeah Let's Rock the new GE Solitaire PlayCards ! 8)

Thank you jazz-e-bob. I'll try my best ! :wink:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest