Hey I had a hopefully simple question that I can’t really seem to figure out. I don’t know too much about python, which is whi I’m having trouble with this.
What I’m trying to do I guess in simplest terms is to access a property from another object. The character in the game has swords and I have it set up so that every time the sword hits the enemy, the enemy loses life ( I didn’t do any of that with Python). The problem is when the character runs, his arms move so he is hitting the enemy without actually swinging the swords. Now obviously in real life this would make sense, but I don’t want the game to be like that. So what I want to do is set up the swords so that they only cause damage when you swing them. My plan was to have a property assigned to the swords and when he swings them, use the frameprop part in the action actuator, so it’ll only cause damage if the value is between 1 and 25 or something like that.
So what I’m looking for is something that will access the property and it’s value from a different object. I want a scrip that I can put on the enemy that will access the property and it’s value on the hero. I hope I’m explaining this right.
Also I should mention I’m using 2.49b if that makes a difference.