Making EventsBeginnersWell... this is pretty boring... all Santa does, is blink at you. So how about we have him say hello to Quote whenever we interact with him. The first thing we need to do, is make a new event.
Events... are basically what makes stuff happen in the game.
Through the script.
Remember that stuff I had you write in the script? Well what you wrote in there was actually an event. There are 3 different parts to a basic event.
This is the event number. Setting your Npc's event number to this will make them run the event if you make them "Interactable" and interact with them in-game. It also does other stuff, but i'll explain more on that in a later lesson.
the music currently playing, to bringing the player to a different map.
This command ends the current event running in the script.
So let's make a new event, and give it an event number of 101. And let's put in the commands necessary for a simple message.
Now, there's one last thing we need to do, make Santa run this event when the player interacts with him.
Now we need to go into the little blue box above the entity list and change the Event # to 101:
And scroll down to the bottom, and check off "Interactable"
*Ignore the second "Interactable" at the bottom, i'll talk about it in a later lesson.
Now make sure you save your map again, and lets run the game once more.
Congratulations! Assuming you did everything right, we've just made an Npc display a simple message whenever you interact with them.
Previous Lesson: Creating a map (part 2) Next Lesson: Making Events (part 2) |