AI (Artificial Intelligence) in Construct 2

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

artificial-intelligence.capx

Download now 569.65 KB

Contributors

Stats

13,955 visits, 35,200 views

Tools

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 10 Jun, 2016. Last updated 24 Feb, 2020

RIGHT walk sprite

LEFT walk sprite will be same

JUMP sprite above

Now you have four animations and you must remember to NAME them properly so when we come to coding it will be easy. I have named these animations as:

SAID_IDLE

SAID_RIGHT

SAID_LEFT

SAID_HUMP

Now you must be wondering what is SAID_ means? Well it stands for

Sprite Animation Identity (ID)

Add Platform, Scrollto, and flash behaviour for player. Also create Instance Variable and call it Player_DIR and text “IDLE” your player property should look like below:

Ok lock player layer and add another layer call Enemy_Monster and drag it below player layer. Add this sprite strip.

As before you import above sprite as strip but this time enter

Horizontal = 4

Vertical =4

For enemy we only need 4

These four frames name it as SAID_WALK.

Add Platform behaviour for Enemy

You will need 4 Instance variables as follows:

State_Ofenemy = 0

Speed_ofenemy = 150

isenemy_OnGround = 0

DIR_Ofenemy = Walking

  • 0 Comments

Want to leave a comment? Login or Register an account!