Hey.
I made a little demo to show what I want. I just want the character to move to a target and attack it. (Textures were deleted and I was to lame to add new) The only problem is that I can’t make more enemies :P.
And if anyone has a python script, I would really prevere so thx a lot =].
Would be nice to have a greater feel of “z-targeting” like in the legend of zelda series. So when the enemy is selected, the player tracks to the empty. Using that tracking, it would be simple to have the player move to the enemy and attack:
If the enemy is selected, a property turns on a “track to” actuator. This may require some python to use the selected object (the enemy) as the object to track to once you have multiple enemies. Then have the player move forward (automatically using a motion actuator) until a near sensor (with the enemy as the goal) is activated. At that point, start attacking.
This might be a good place to look into using the state system.
I played around with your game, found out how it works (it’s missing a bit of speed, other than that you created some good RPG gameplay) then instinctively put the plant in another layer and created an Empty that would add the armature object (which in turn added the plant and the HP bar).
Then the editObject actuator would add the plant into the scene. No problem at all.
But…
Whenever i tried to use editObject to add more than one plant it would crash blender for some reason. Tried in the default scene to do the same thing and it worked with no problem, So there should be some problem in your scene which I can’t quite grasp.
So I send you a file where you press F to add a plant, which doesn’t crash blender even if you press F 300 times. You’ll have to get several empty’s add one plant at a time, at a very fast rate, instead of adding all at the same time
Sorry but I don’t really get it. The plants are automaticly added, and the character won’t walk to them or fight anymore. And everytime I press esc button, blender crashes…
I really can’t figure that one out either. You should use python instead of overusing controllers and a lot of sensors and work out your logic like that.