Monday, 28 November 2016

NPC movement and scripting

Another way to create an immersive environment is simply allowing npcs free movement. This makes them appear more lifelike and a lot less static. After all, which is more likely to be amusing? A mannequin or an actual person? While the npcs here are NOT real people, we can SCRIPT them to BEHAVE like one! And this what I learned today. Giving enemies random movement is easy. You simply set their movements to Random and set the speed of which they walked and the frequency of the number of tiles stepped in 1 second. The real tricky bit however, is making npcs move to your will. This requires a stronger understanding of your variables and movement input. Since you'll be taking control from your npc, you would want him to perform some task or move somewhere to complete the experience.

The difficulty here was not in planning the movement, but rather the events BELOW it. Yes that's right/. For some reason, npcs cannot walk on or walk through event tiles even if said event has not been activated, So for a couple of nights, I tried creating complicated scenarios that required several characters to move at once to certain locations without interfering with other event tiles and/or trigger events. In order to facilitate this feature, I had to expand  some maps/roads to provide npcs more ground to cover and therefore more places to script their movement. This is turn provides me the opportunity to once again implement certain events with added movement to my narrative.

 

No comments:

Post a Comment