Sunday, March 27, 2011

Scared Alien

Scared Alien
I had a bit of success again this weekend, I was able to get my Alien Zombie that stands on the ancient stone circle hill top next to the UFO to run away from my FPS player when he gets within a certain range. Weekend not over yet so hopefully I'll be able to add the waypoint stuff into his "ScaredAlien AI" script so that way he will wander around a bit. This alien is scared because when the UFO takes off from you getting too close to it he gets stranded so of course he's scared. Of course that means you have to chase after him to shoot him though, well not really if your aim is half ways good.

Edit: I found I had to make a few tweaks to his run speed, aware and scared distance parameters because depending on which direction I would approach from sometime when he would run away from on top of the stone circle hill he would end up, up in the air? So I had to fix that. I also gave him a nice "alien shriek" sound for when he starts to run away. My other alien in this level that is SUPPOSED to attack my player, and he still doesn't :( I did manage to get him to wander back and forth between two way points. It seems if I add a 3rd waypoint he goes to the first one fine but when he reaches about midway between the 2nd & 3rd waypoint he gets all "jerky" like he doesn't know where to go. That's something snafu in the code I'm sure but I'm just NOT code savy enough to see what it is. So I pulled the 3rd way point and now he will just go back and forth. The other thing is, is that if he sees my FPS player and comes after him, if I get out of range instead of going back to his routine of wandering his waypoints he just sort of stops and runs in one place?? I don't know why that is, again another code snafu :(

Late Edit:
For some reason when I went to test out my game this morning it was acting all "Choppy" and "Stuttery" for lack of better words. So I pulled out the "Alien Shriek" sound and the script calls to that and everything worked fine after that. WTF!! it was working so fine yesterday so just WTF was going on there I just don't Frakin get!! Man this stuff REALLY pisses me off sometimes!

No comments: