In this last section we will be covering:
• Importing our NPC art and animations
• Setting up our NPC interaction
• Programming our story-arc for our NPC to say
Now let’s import NPC (None Player Character.)
Name this sprite as spr_NPC
Name Animation ID_1
Add Animation Name it ID_2
Set origin point at bottom. Now let’s add Behaviour as follows:
Line of sight set Range to about 100
Now what this NPC has to do is when Player come in contact it will bring up something like Press this key or that key. So when player press this key something happens.
Import Sprite PressX
Name this sprite spr_PressX and set Visibility to Invisible.
Now create new sprite and import these animation;
Import MSG Sprites
For this sprite create 3 animations and name it and set it Visibility to Invisible.
Place this sprite on HUD layer somewhere like below;
Name this sprite to sprText;
Create new Event Sheet
Now let’s create new event sheet and name it NPC Events. Also remember to INCLUDE this NPC Events sheets to Maingame_Event.
Now go back to your NPC events and add GLOBAL VARIABLES npc_Story = 0 and add line below: