How do I create an AI Tiger

  • There are missing quite a lot as to making the tiger attack, meaning you have no attack event or attack animation in the game

    So Ill just show you how to get to the point where the tiger stops, and you can create the attack event and animation. There are some things in the game that you don't really need as I see it, but if they serve some other purpose later on you can ofc just leave them.

    But I would remove All the behaviours on the tiger, except "BoundToLayout", "Solid" and then just choose one of the movement behaviours. I kept the platform behaviour for this example.

    You don't really need Every tick as C2 will do this automatically. Also Putting the "Set Fullscreen scaling to high quality" you should just do in a "Start of layout" no need to do that every tick.

    I have removed your movement action and replaced it with the platform simulate control, the speed of the tiger you can just set through this behaviour.

    The next event, is when the tiger gets close to the player it will stop, if the player moves away it will "follow".

    So you can add the attack animation and whatever else you need when it attacks here. You will need to add some kind of cool down to the attacks and ofc fix the movement, if the tiger is suppose to move in both directions etc.

    Anyway hope it will give you an idea of how to continue.

  • Could you do this for me please as i am very confused about how this would work and how to do it and could you then post it please and thank you.

  • Adam568 Do not get me wrong but, you have learn to walk before you can run. We can guide you but we cannot make working capx for you or anyone.

    nimos100 has explain your predicament properly learn from it. In no time you be creating game like pro. Best if you cannot understand read C2 famous manual. Good luck

  • Could you do this for me please as i am very confused about how this would work and how to do it and could you then post it please and thank you.

    I could, but wouldn't make much sense, since you need to make the graphics and the whole combat system. As I said in the first post, these things are missing, so there is not really anything to help with in that regard. Also you probably want other types of enemies, so you have to make those work as well.

    As Lordshiva suggested, you are better off doing it yourself and try to figure out how to do it. And if you get stuck again you can ask on the forum.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I advice setting some variables to check your X and Y distance first (between player and tiger). Then check using compare X and compare Y if the tiger is at your (player) left or right

    Well, I was going to type a long one but I already did here

    https://www.scirra.com/tutorials/1320/p ... enemies-ai

    Basically use compare X, compare Y and the X and Y distance variables to determine if it will run left, run right, or attack (when near you)

    Go have a read at it. It has capx.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)