parent help Part 1

In the blend you can use arrow keys to move back and forth press space and the parent is removed. If i use a keyboard sensor to reparent it works no matter how far cubes are, but i want them close before they parent, so i tried using the near and touch sensor. Which don’t work. I just want to unparent then parent when the cubes are very close or touching automatically. If that is possible i will go to part 2 of my question. maybe i am looking for constraints but not sure

digiman

Attachments

Parent.blend (130 KB)

Parent_M.blend (310 KB)
Hey… try this.
Use WSAD to move the green box around… when you get close to one of the yellow ones, hit space bar to take it with you… then when you tire of it… hit space bar again and let it go. You’re free to pick up another one.

:slight_smile:
M

Beat me to it, Molino! Out of interest, what does the toggle do in properties? Does it change the Boolean property?

Hi Rubbernuke… the proprty Actuator toggles the parent property from False to True and back. The Boolean property just sends a True or False signal. If it’s True, do one thing… if it’s False do another.
So if you’re close enough and you hit the space bar you toggle that boolean property. If you’re too far hitting space bar does nothing.
M

Nice! Learnt something new!

Cheers

Paul

Molino - this is a nice pick up all the girls at once puzzle game!

I can’t open it I am using 2.49 2.57 does not work well on my computer I think from your description you misunderstood. I can easily make a keyboard sensor work What i wanted is to release the parent by pressing space but once the cubes are close together by pressing arrow keys the cubes automatically parent to each other, no pressing key.

After fooling with it and using collision sensor, the cube move side to side pressing arrow keys but once it touches to the second it parents pressing space bar removes parent until the cubes are touching again I just need to set it up for armatures. thanks anyway

digiman

I made it in 2.57… I should be able to get what you want… let me play with the file again.
Sorry for the missunderstanding.
M

Here ya go… I made a 2.57 and a 2.49 version. So… use WSAD to move your guy around. When you get close enough… the other cube is parented to you automatically… when you get tired of it, just hit the space bar and it gets let go.
Right now… you can pick up all the cubes together… you might want this … you might not… to set it up so you can only pick up one cube at a time… well I’ll let you figure that out. It’s late… and I don’t want to do aaaaall the work.
:wink:
Good night.
M

Attachments

Parent_M1_2.49.blend (198 KB)Parent_M1_2.57.blend (349 KB)

Thanks, Like i said i made my own blend using collision sensor that works great and i use a lot less logic bricks, but thanks it’s good to see how you hooked up the blend. I will need help with the second part of my question which i will post tonight or tomorrow. Hopefully you can help with that, which i think will be a bit harder because i am not sure if i will need another parent or a constraint

My blend is hooked up like this On the blend i gave get rid of the always and radar sensor replace with just a collision sensor adding the property name make sure the INV button is slected for both the collision and keyboard senor works like a charm

digiman

Cool… can you give a sample of what your set up looked like in a blend file?
M

It’s what i described to you but here is the blend 2.49 The cube now has an armature as well with an anmimation Also the INV buttons don’t need to be selected
I like it because only a few logic bricks

digiman

Attachments

Parent2.blend (483 KB)

Hey neet-o, thanks for sharing that.