RPG Tutorial (Part 2)

3

Index

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

3,263 visits, 6,218 views

Tools

Translations

This tutorial hasn't been translated.

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.

In this part 2 we are going to add communication between Entities (creature). There are many ways one can add these Entities. I will show you simple way after that you must take this further and learn from it. Only thing I can do is guide you rest is up to you friends. Let us start

Now on our Wall Layout unlock if it is locked and insert new sprite. This sprite is sign board. You can use my sprite below:

Size 16, 16 and now set Collision Polygon like this example below:

Call this sprite spr_Signs and place it anywhere you wish in your layout. Now for this spr_Signs create Instance Variable and name it sign_ID.

Add behaviour LineOfSight and Solid. Set it as below

Copy many as you like but remember to change sign_ID Instance Variable likes below:

sign_ID = 0

sign_ID = 1

sign_ID = 2

sign_ID = 3 and so on

Do not worry at this moment if you cannot understand about sign_ID = 0, 1, 2 or 3. Soon as we start adding code it will become clear to you. Insert this sign board in you wall layer should look similar below:

Now please insert Array plugin and name it arr_mapMSG for now. Once you know how to use arr_mapMSG (Array) then you are master just like Ashley or Tom. For this arr_mapMSG I am not going to use loop because this tutorial is simple as possible. You can use loop or other method if you know how.

Before we go any further please create Layer and name it HUD (Heads up Display) and set Parallax to 0, 0.

Create Text and name it txtMSG place this Text on Top screen centre HUD layer. Set colour and size as you wish. Do not add any text should be empty.

  • 0 Comments

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