I have started making my first game in Armory as a college project. However, I am having issues using the game logic nodes. So far I have made two logic trees as a test. When the left mouse button is pressed, my characters armature should play an animation and then send an event which triggers the second logic tree which spawns an object and moves it to a location as well as give it some velocity on the X axis. The trouble i’m having is that none of this works. I have been through the manual and have assigned the first tree as a trait to the armature as it makes it play an animation and the second to the object I am having it spawn a copy of. I am not sure what the issue is or if I have used traits wrong but nothing happens when I press the left mouse button.
Something I have noticed is that when I play the game, it sets the two logic trees to not having an active user as if I had pressed the little ‘F’ next to it. I’m not sure why as it should have a user set through the trait but its causing me a lot of frustration.
Thanks in advance
The little “f” makes that Blender doesn’t delete the Trait when terminating Blender if it is not applied to any object, also called "creates a "f"ake user.
Can you send the .blend please? Just drag and drop it in the writing window.
Sorry the file to to big but I have uploaded to DropBoxBlender File
I also can not get armature animation to work, maybe I am doing it wrong, maybe there is a bug somewhere.
For sending the Event to the other Trait you have to use a “Send Global Event”- node, else it the “On Event” nodes will only register it when they are in the same tree.
For spawning an object at a certain location, you need to plug in a Transform into the “Spawn object”-node. In your case, plug the “get Location”(Sphere) into a new “Transform”(location)-node, and that then into the “spawn object” one. “Translate Object” moves the object every frame by the given Vector, not to that position.
To be able to use the nodes in the physics-tab(set velocity), the concerned objects have to have Rigidbody on them enabled.
Thanks so much, only just started using armory recently and that gives me a lot of help. I will keep a look out for the next animation.