any alternates for edit object -> add object (parented)

I have a game where you move around and shoot the bad guys.

I have had this problem for a long time

it is when you add a object all of its children come to the new layer but they do not act as they should.

for example
e = empty (parent, moves around)
zombie = the model (child , animates , checks the colision of a ray for shootin)

if i copy zombie into layer 1 (my game layer) and shoot it, it acts as if it got shot

if i bring through a zombie through my monster spawner (edit object add object e) e and zombie come through to layer 1 but my bullets (ray) go right through the object(zombie).

(maybe there is a way to pull them into the layer seperately and then link them as parent and child after? I dont know, I remember a copy location python but i can’t find it. )

Any help to this solution would be highly apreciated. its the last step for my game to work. have hordes of never ending zombies every coming at you.

what if you had only say 6 of these complete zombie setups and after dying set their position using python [instead of ending the object and spawning a new one]

The point is not reseting them when you die?

Im talking about having spawning points so you can have more monsters come into play after you kill the current ones.

so you could keep killing them over and over again.

spawning is a simple ideal and almost every fps uses it. Blender seems to have some odd flaw with spawning parented objects.

Again does any one have a way around it.

for example copy location (at like a parent).

Well for spimplicitys sake it tried some more tests.

No parents this time, if i have it in the scene when the game starts bullets will hit the item and it will disapear (like its supose to)

If I add it to the scene after the game starts (edit object add object)
the bullets go right through it.

(* note, Im using a ray method so that it cast a ray and if it sees a property on the object then it sets that property to a new number in which causes the object hit to disapear ( end object) )

Any one know Why this happens or how to fix it? Is the add object broken or am I missing something, because they still chase after me just dont die lol.

I think the idea mentioned above of having say 6 zombies in the main game layer hidden in a room below the floor waiting and doing their zombie thing.

When you trigger a sensor instead of adding an object set the required position of the zombie using python(Jumping to the right spot for you to interact and shoot at.When he is dead(hey you can’t kill zombies can you?)he will jump back to the hidden waiting room.Maybe one zombie for each trigger point called into action as required

You may have to watch the frame rate to see how many zombies can be waiting. I have had a similar prob with adding complex composite objects and it seems to work. Noone will ever Know.

Dr S

Recycling huh.

ok so that might work for what i want. But its one heck of a work around.

But at the same time that is also saying the add object does not work right? I really wish someone would enlighten me on this subject. Is it a layer problem, is the properties of the object no carried over when the new instance is made. Is there a real work around, maybe some way to do it in python instead of the add object actuator.

I mean blender is a nice and fun engine to play with, its really easy to set up what you want quick. This bug in the engine has been bugging me for years. lol maybe someone could fix it?

  • Sorry zero d I misunderstood what your were saying. dr s comment helped me understand it.

I don’t think this is a bug, as I’ve done pretty much the same thing as you and it works fine.

One thing to be very careful of with added objects is scale. It will always add them at size 1.00. So make sure you have size/rotation applied to the hitbox using CTRL + A. Other than this I can’t really comment without looking at the file in detail.

Blender can be a pain to work with sometimes, but it’s usually always something minor causing it. There are a few serious bugs in there which cause a lot of problems, but few people run into those…

Ok i have narrowed it down to exactly whats going on.

Using python i was trying to find out what the property value is of the new object i created with the add object actuator.

I found that the new object does not contain its orginal property.

  1. Is there a way to access the actuators of a object if its not your current controler. (this would negate need for property)
  2. why doesn’t the property carry over? when a new instance of the object is created.
  3. Is there a way to check all properties of that object (see if its being named differntly or something odd like that)


are you sure you are actually getting the added object? [you will have to check on the next logic tick, it isn’t available after you pulse the actuator immedately]

it doesn’t look like they show up in the dir of the object

  1. Yeah i have it set in the code after it sets the actuator and I make it copy its name so that i see that it got something. What you said would explain a error i was getting though.

anyways I found that I had this working before, I dont have the game on hand though, sigh im visiting family and I left my cds behind.

So it must be something im doing wrong. (i just relized im using newest blender , going to try old blenders as well)

here is the a zip with what i got now, left side starts in game layer and works, on the right side is the flawed spawner.

here is a old test demo i have online

  • need to add the python23.dll to make it work. and i tried to open it up with 2.28 and publisher, niether reads the files but it clearly shows it can be done. I think i made it with 2.28

Hope at least. and if i can’t figure it out before the end of the week i will have access to my files and see what im doing wrong when i get home. So please help if you can, doing this small game for my brothers and sisters, or i will just have to wait till i get home.

Ok guys I found why it wont work.

It works in blender 2.36

but not in 2.37 or 2.40
it must be some wierd bug with add object actuator in 2.37+
It also seems to be that the reason its not working is something do with the property not being passed in the new object. Anyways I would say this is a bug.

Where do i report a bug like this?
Well i can continue to make my game now, using 2.36, untill they get it fixed for the new blenders. yay for monster spawing.