0

Below is my Logic editor of this problem. I have my armature always playing a walk action, then when it collides with a property called "Player," it is supposed to play a die animation. (It is an enemy :) I have set priorities, but right now when "Player" collides with it, my armature just plain stops. Any ideas? Thanks! Logic Editor of Problem P.S. Tell me if I need to add more screenshots. :D

If there is any other way to accomplish the animations correctly, I would love that as well.

Silas
  • 366
  • 2
  • 13
  • 1
    Total speculation: set a different animation-layer for the die-animation? Otherwise you could create a boolen-property of the enemy (default true), that is set false on collision. Animations are played: while true -> walk, if false -> die – Quacksilber Apr 25 '18 at 19:35
  • That sounds interesting. I am somewhat new to blender, however. Would you care to explain how to do that as an answer? I think I would benefit from it with bunch of other actions/armatures as well! – Silas Apr 25 '18 at 21:27
  • Whuch one of my possible answers? Im not sure about the first one, but I guess the second one would work – Quacksilber Apr 28 '18 at 18:54
  • Animation-layers can be changed if you click to another number in the actions actuator, the little rounded input-box that says Layer: 0 – Quacksilber Apr 28 '18 at 18:56
  • 1
    And since you said, you're new to the blender-game-engine, I want to inform you, that the game-engine will be deleted from blender upon the next blender version 2.8, so I don't know if it will be worth it for you to spend your time on learning the game engine. Blender is an awesome tool for 3d-stuff, but if you want to get in to serious game development, i'd recommend you to have a look into that post, which explains why why bge is taken out of blender and gives you professional alternatives: https://blender.stackexchange.com/questions/106972/what-will-happen-with-blender-2-8-game-engine. – Quacksilber Apr 28 '18 at 19:25
  • Hehey! It works! Neat. That second method is much cleaner. Yeah, I saw that yesterday, my plan is to finish my game without upgrading to another version of blender and then move onto a different game engine. Is there one you would recommend that you have used before? – Silas Apr 28 '18 at 20:13
  • 1
    I've never done games outside of the BGE, a friend of mine uses Unreal Engine and is quite happy with it, but I guess Unity is equally good. :)

    Maybe this article might help you https://www.pluralsight.com/blog/film-games/unreal-engine-4-vs-unity-game-engine-best

    – Quacksilber Apr 28 '18 at 20:31
  • No problem, I'm glad your problem is solved now. :) – Quacksilber Apr 28 '18 at 22:33

1 Answers1

1

First method (but dont know if that'll work):

enter image description here


Second method (more complicated but works defenitely):

enter image description here

  1. Add a game-property to your enemy. ( + Add Game Property )
  2. Set it to boolean and checked (= true). (See red boxes in the image)
  3. Connect the collision-sensor to a property-actuator.
  4. This actuator has to set the property to "false".
  5. Add a property-sensor for each action-actuator. While the property is true (enemy alive) the walk-animation will be played, when the property is false (enemy dead) the die-animation will be played.
Quacksilber
  • 588
  • 6
  • 20