Course Curriculum
-
Getting Started
Getting Your NPC to Do More
Let’s look at what else you can get your NPC to do.
Proximity Triggers
Proximity triggers work in response to a player approaching or leaving the NPC. Add these to your NPC script before or after the click trigger and chat trigger.
proximity trigger:
entry:
script:
– chat “Hey you! <player.name>!”
exit:
script:
– narrate “<npc.name> waves goodbye.”
Hunting Quests
Add a variation of this line to the NPC script, when you want to start the quest.
– listen kill type:entity name:zombie qty:4 script:Killed4
The last argument of that line is the name of a little script that should happen when the person does that task. It can look something like this.
Killed4:
type: task
script:
– flag player KilledZombies
– narrate “You killed 4 zombies! Go back and tell so-and-so you did it!”
Open and close chests
You can have your NPC walk over to a chest and then have the chest open and close.
– animatechest l@15,89,-45,questworld
– animatechest l@15,89,-45,questworld close
Giving your NPC personality
Make sure you give your NPC personality. There are lots of ways to do this. Here are some ideas.
Give him or her some quirks:
- Maybe he delays (- wait 2s) and then corrects himself.
- Maybe he has a favourite word he uses over and over.
- Maybe he makes really cheesy jokes.
- Maybe he wants to dotes on people and tries to give them lots and lots of extra things.
- Maybe he’s always asking people for money, promising he’ll pay them back with interest and never doing it.
Give him a backstory! This is your chance to let your creative writing shine. Have the NPC tell you about where he came from and who he is. Let players ask a few questions. (Remember you can use the narrate command to give players ideas.)
