I had a big mistake in my AI behaviour system. I added in basic bahaviours one to make the NPC approach the player and engage dialog, until I found that such idea is not very wise. Sending the NPC to mindlessly talk with the player any time it is visible doesn't works. Let's suppose the NPC has a quest to assign, what happens when such quest is completed, or in case you reject the quest? The NPC will continue to harass the player, starting a dialog in every occasion.
In this case, my approach is to use a trigger collider. I set up a GameObject with a box collider, and attach an script that makes the required verifications: does the player has the quest already? what's the status? This can be used to trigger attacks that requires prerequisites, like raiders that attack you only if your level is below some value, or if you belong to some faction.
By the way, am I the only one who is not impressed at all with the Unity GDC keynote?
In this case, my approach is to use a trigger collider. I set up a GameObject with a box collider, and attach an script that makes the required verifications: does the player has the quest already? what's the status? This can be used to trigger attacks that requires prerequisites, like raiders that attack you only if your level is below some value, or if you belong to some faction.
By the way, am I the only one who is not impressed at all with the Unity GDC keynote?
Comments
Post a Comment