Blimey Charlie! You know when you haven’t updated you blog in a while when you can’t remember the admin URL! Luckily for me I’ve been getting a few comments left on pages with have needed moderating from helpful individuals telling me how many more hits they are getting than me, that they outrank me on google from people who have farming blogs, surfing blogs, hearing aid blogs and other random people wanting to leave links on my pages. So thanks to the latest one, from the email reminder link to moderate, I was able to find my admin page!
Anyway, I utterly digress again. Today’s update is about enemies and enemy AI and why it is best to actually heed the advise of people online when they are telling others that certains techiques don’t work well. On techniques that I was so sure would work well was to use crowds for my zombies. Initally it seemed like a very good idea, crowds run from one point to another and can react to your proximity. Crowds also take very little damage to kill, perfect for a bog standard zombie, so why am I about to tell you to not use crowds?
They are really quite poorly documented beyond making a few hundred actors go from one point to another. You see, I was really quite intrigued by “Crowd Behaviours”.
So after spending absolutely ages working on getting crowds working so that they would flock towards the player, I had to give up. But I did learn some things with this process.
There is an option to use a DynamicGameCrowdDestination, my thoughts were to set this as the second point and attach it to the player using Kismet, to first get the location of the player, set the location of the DynamicGameCrowdDestination to the player, then attach the DynamicGameCrowdDestination to the player (I hope I don’t have to type that again). The results were inconclusive as the crowd agents seemed to have a mind of their own anyway so I couldn’t tell if it was working or not.
So some googling later I came across this post on the Epic forums http://forums.epicgames.com/showthread.php?t=755213 . Now I can’t remember the actual keywords I used, but thanks to tegleg for the scripts. My intention here isn’t to rip off his work, but to go through the process of applying it for those who are struggling to implement scripts such as these.
I’ll go through the process in the next page but here is a demonstration of what I have implemented.