simple question here

First let me start off by saying this is a very helpful forum. I am ashamed to say I have lurked these boards for sometime now without posting. But I have always seemed to find the info I was looking for. Well, enough with the handshaking and on to the question.

Please forgive me if it has be posted before, I just couldnt find it anywhere. But my question is, can an item on one layer change the property value linked to an item on a different layer? For example, I have a bullet item in layer 2. All my other geometry is on layer 1. I have the bullet’s collision sensor set to change a property (linked to the wall on layer 1) if there is a collison between itself (now visible in layer 1 after the user clicks the fire button via edit object / ADD) and my wall. Also, is there a workaround if this is not possible?

I’m pretty sure they have that, but I haven’t done any bullet things. But anyway, if you got that far, why not just try it out? I like to experiment with cubes, myself, in a different project. If it was me, I would have one cube, give it a property, then run another cube into it on the same level and make sure everything is working. Then I’d put it on a hidden level and use a create object acuator to try it out. Usually you give the bullet a lifetime but it wouln’t make sense not to have collision work. I have a book mark for a bullet tutorial but it’s about getting the light to work, might help though:

thanks for the response. I have tried it (I guess I didnt explain that did I lol). I have a cube that the player can control. If that cube hits the wall it updates the property as it should. but when the user fires the bullet at the same wall, the property does not change. My guess was it is not working because the bullet is from a different layer than the object it collided into. I was curious if this is correct, and if so, is there some sort of workaround.

thanks again tho :smiley:

Hmm. I just tried it and an object registers collision from an object added from a hidden layer. Which object has the property? You could try slowing it down, too, it might pass through before it gets a chance to register. I reread your post and set collision to the bullet, but it still registers collision.

hmmmm good idea about slowing it down. I bet thats it. I will try once I get to work. I dont have the file here at home to test.

Ahh, I see what you mean. I’m not all too sure myself if linked objects can change properties of another object if that linked object is in another layer. Well if you’ve tried it and it doesn’t work here’s a workaround.

Instead of linking the 2 objects. Have the added object (in layer 2), send a message to the object in layer1 when it collides with the wall. When the object in layer one receives the message have it change the property.

Jason Lin

alright the message thing worked. Here is a brief explanation…

My bullet (this object resides on layer 2) needs to update a property within an object on layer 1 after a collision (the bullet is added to layer 1 when the user pushes the fire button). I added a message actuator to the bullet that fires upon the collision of the object on layer 1 (the wall for example). Then I added a message sensor to the object on layer 1 (the wall) which updates the property.

I hope thats clear :slight_smile:

thanks for the help!!!

I should probably stop nagging people about Python, but it makes changing properties extemely easy. :stuck_out_tongue: