RPG Part (6)



Attached Files

The following files have been attached to this tutorial:



4,179 visits, 9,208 views



This tutorial hasn't been translated.


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.

Insert rest of code

What we doing here is hiding our PressX sprite. It will only become visible when Player is in sight and not until then. Also when player Press X our sprText become visible too. In our next line we are setting Global variable npc_Story to 0 and then increasing by 1, 2, 3 not 4 because we have only 3 sprText so when we reach 3 we are setting it 0 (ZERO), also hiding sprText. Rest is easy for you to understand.

Now the NPC is done what we left with adding Enemy so player can shoot and collect whatever enemy drops. This is not that hard. Does not worry if you don’t understand first time take your time and read each line carefully. Not rocket science.

Now is the time to add our enemy and let our player shoot and kill or be killed?

Adding our enemy

• Giving our enemy blob a health bar

• Adding our movement, attack for our enemy

• Enemy place to spawn and continuous spawning!

• Add a way for our player to kill the Enemy.

• Add a system for player to collect loot!

add new Event sheet

Now please add another Event Sheet and name it Enemy Events. Your entire event sheet looks like below:

Create Enemy

On your player layer create new sprite insert these sprites or create your own.

Create 2 animations and name it



Name Enemy sprite



Give our sprite Enemy Behaviour below

Enemy Health bar only need 1 behaviour



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