Thursday, March 31, 2011

Alien Zombie Attack And Kill

Finally after 2 months of pure frustration I have managed to get my Alien Zombie to attack and inflict damage on my FPS player. It took a lot of time but Finally I got help on Unity "Statement" solved my biggest problem. There is some fine tuning to do like add Alien Zombie attack sounds for when he attacks and then polish up their animations a bit more. but it's FINALLY getting somewhere.

Y'know what the most aggravating part about all of this has been,? It's that in my code it was only a few short lines needed to be added and one line needed to be tweaked.

Wednesday, March 30, 2011

Alien Artifacts Full Screen Inventory GUI Part 3

So far I've created my first "Alien Artifact" and it's PNG icon that is supposed to show up in the position you see on the left (lower window). Right now there is no working code supporting any of this until I can get something that works. I have a code in progress but it is very much incomplete at the moment as I don't know that much about the code to finish it off and get this part of my game working. Right now I just have these two element set up a GUI textures that I have tweaked into position using the values in the inspector window of unity 3D. It's my hope that the code will place my "Alien Artifact" icons just like I have started to do here.

Here is the code I have as a work in progress at the moment:

var i = 0;

var alienArtifacts = 0;

if(i == 1)
//put the code that makes the item holder here
//you might want to add code for which ones you have got


if (/one of the artifacts was picked up/)
alienArtifact ==1; //other stuff like what artifact was picked up

function Update () {
transform.position.x = 0;
transform.position.y = 0;

guiTexture.pixelInset.x = 0;
guiTexture.pixelInset.x = 0;

guiTexture.pixelInset.width = Screen.width;
guiTexture.pixelInset.height = Screen.height;
As you can see it's very much not finished and needs a lot of work. Man I could really use a code person on this project. I also need this code to disable that weapon, health & ammo stats GUI you see in the lover left hand corner also, so that way when the player presses "I" the "Alien Artifacts" GUI pops up and nothing else is visible until ["I"] or ["Esc"] perhaps to exit from the inventory screen.

Tuesday, March 29, 2011

Alien Artifacts Full Screen Inventory GUI Part 2

OK I created the first of my 4 "Alien Artifacts" that "Farmer Bob" will need to collect throughout the game. I knew this part of my game was destined to be a real pain in the ass but I had no idea the pain I'm getting into with his. First off I thought; "Oh sure this should just be a simple matter of creating my Alien Artifact, plopping on the sound for it to emit, then plop on the "PickUp" java script, lob all that into a prefab and then make a new UFO Animation event that will Instantiate my new prefab close to where my UFO crashes." and is it that simple? Frak No! First off the way I thought to code it was wrong so I popped on over to Unity Answers to get hopefully a lead in the right direction. Some of kind folk there helped me out by providing this script to add into my UFOanimationEvents.js:
var explosion : GameObject;
var wreck : GameObject;
//var artifactTarget : Transform;
var alienArtifact : GameObject;
function ExplodeUFO()
        Instantiate(explosion, transform.position, transform.rotation);
function KillSelf () {
        yield WaitForSeconds(3);
        var wreckClone = Instantiate(wreck, transform.position, transform.rotation);
function dropArtifact () {
    var artifactPosition = Vector3(276.7286, 5.241356, 963.852);
    var artifactRotation = Vector3(270, 0,0);

    var Artifact01 = Instantiate(alienArtifact, artifactPosition.position, artifactRotation.rotation);
    print("Artifact created");
Highlighted bits are what's been added to my existing UFOanimationEvents.js It's supposed to instantiate my "Alien Artifact" at a precise location so that way when "Farmer Bob" goes to investigate the UFO crash he will find the first Artifact.
But can I get a break and something would actually work for a change? Hell no! For some reason this is not working. So I thought I would try it another way. I moved my "Animation Event" back a few frames so that way the "Alien Artifact" would get sort of dropped mid-air a short distance from the UFO when it crashes. Sounds good right? Wrong!. It would just fall through the ground. So I had to give it a ridged body and turn off the boxcollider trigger. so now it does NOT fall through the ground anymore, but now my FPS player can't pick it up!! Grrrrrr... Frak, Frak and Double Frak!!

Monday, March 28, 2011

Alien Artifacts Full Screen Inventory GUI

I made a background image for my FPS game where my character "Farmer Bob" has to collect 4 "Alien Artifacts" that he will find lying about either after something has happened in a game level or somewhere inside the game level. Once "Farmer Bob" has all of the "Alien Artifacts" they will enable him access to or be able to do something special with them. Right now I'm looking into how to make this function inside of my game environment. I currently have it set up as a full screen GUITexture object with this code attached to it:
function Update () {

transform.position.x = 0;
transform.position.y = 0;

guiTexture.pixelInset.x = 0;
guiTexture.pixelInset.x = 0;

guiTexture.pixelInset.width = Screen.width;
guiTexture.pixelInset.height = Screen.height;
It's a simple code, the same one I'm using for my Full Screen blood effect for when my FPS player takes damage. Now what I need to figure out is for when my FPS player picks up an "Alien Artifact" it will get added into this inventory screen into one of the place holders I have set up here. My guess is, is that I would make a smaller GUITexture to represent each "Alien Artifact" and then somehow have the code place those "Alien Artifacts" into the appropriate spot on my inventory screen in order of how "Farmer Bob" collects them up. I then somehow have to make sure that, that game information is carried over from level to level as my player moves between them. I've not yet figured out or decided whether or not to have my character go back and forth between levels yet. I'm thinking yes! Because it might make the game more challenging if "Alien Artifacts" and other game objects are missed, then he would need to return to either find them or pick them up.
All this and I STILL have NOT been able to get my stupid Alien Zombies to attack my FPS player. Grrrr...

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!

Wednesday, March 23, 2011

Alien Zombies Splash Screen & AI Script issues

Even though I'm nowhere near done I thought I would tinker around with some "Splash Screen" ideas today while I was still trying to figure out my Alien Zombie AI script problems. I was thinking that some of the screen captures I had done looked pretty nice. Even nicer I suppose if I run them through Corel Painter and tart them up a bit. But I thought I might as well get the ball rolling on that as my game will eventually need a start screen where players can click on "start Game" or "Choose Level"... stuf like that. All of which will have to be worked out and I've no cluse at the moment how any of that is done although I have watched a few video tutorials on splash screens and it doesn't seem too bad to understand. UNLIKE my blasted Alien Zombie AI script. check this crap out man.

var speed = 3.0;

var rotationSpeed = 5.0;
var attackRange = 30.0;
var dontComeCloserRange = 5.0;
var pickNextWaypointDistance = 2.0;
var target : Transform;
var modelAnimation : Animation;

// Make sure there is always a character controller
@script RequireComponent (CharacterController)

function Start () {
// Auto setup player as target through tags
if (target == null && GameObject.FindWithTag("Player"))
target = GameObject.FindWithTag("Player").transform;


function Patrol () {
var curWayPoint = AutoWayPoint.FindClosest(transform.position);
while (true) {
var waypointPosition = curWayPoint.transform.position;
// Are we close to a waypoint? -> pick the next one!
if (Vector3.Distance(waypointPosition, transform.position) < pickNextWaypointDistance)
curWayPoint = PickNextWaypoint (curWayPoint);

// Attack the player and wait until
// - player is killed
// - player is out of sight
if (CanSeeTarget ())
yield StartCoroutine("AttackPlayer");

// Move towards our target


function CanSeeTarget () : boolean {
if (Vector3.Distance(transform.position, target.position) > attackRange)
return false;

var hit : RaycastHit;
if (Physics.Linecast (transform.position, target.position, hit))
return hit.transform == target;

return false;

function AttackPlayer () {
var lastVisiblePlayerPosition = target.position;
while (true) {
if (CanSeeTarget ()) {
// Target is dead - stop hunting
if (target == null)

// Target is too far away - give up
var distance = Vector3.Distance(transform.position, target.position);
if (distance > attackRange * 3)

lastVisiblePlayerPosition = target.position;
if (distance > dontComeCloserRange)
MoveTowards (lastVisiblePlayerPosition);

//Attack player with "Attack" animation which is basically a clawing and biting animation
//this "Attack" is supposed to inflict damage to the FPS player

else {

var forward = transform.TransformDirection(Vector3.forward);
var targetDirection = lastVisiblePlayerPosition - transform.position;
targetDirection.y = 0;

var angle = Vector3.Angle(targetDirection, forward);
if (distance < attackRange);
yield StartCoroutine("SearchPlayer", lastVisiblePlayerPosition);
//Player not visible anymore - stop attacking
if (!CanSeeTarget())




function SearchPlayer (position : Vector3) {
// Run towards the player but after 3 seconds timeout and go back to Patroling
var timeout = 3.0;
while (timeout > 0.0) {

// We found the player
if (CanSeeTarget ())

timeout -= Time.deltaTime;

function RotateTowards (position : Vector3) {
SendMessage("SetSpeed", 0.0);

var direction = position - transform.position;
direction.y = 0;
if (direction.magnitude < 0.1)

// Rotate towards the target
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0);

function MoveTowards (position : Vector3) {
var direction = position - transform.position;
direction.y = 0;
if (direction.magnitude < 0.5) {
SendMessage("SetSpeed", 0.0);


// Rotate towards the target
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0);

// Modify speed so we slow down when we are not facing the target
var forward = transform.TransformDirection(Vector3.forward);
var speedModifier = Vector3.Dot(forward, direction.normalized);
speedModifier = Mathf.Clamp01(speedModifier);

// Move the character
direction = forward * speed * speedModifier;
GetComponent (CharacterController).SimpleMove(direction);

SendMessage("SetSpeed", speed * speedModifier, SendMessageOptions.DontRequireReceiver);

function PickNextWaypoint (currentWaypoint : AutoWayPoint) {
// We want to find the waypoint where the character has to turn the least

// The direction in which we are walking
var forward = transform.TransformDirection(Vector3.forward);

// The closer two vectors, the larger the dot product will be.
var best = currentWaypoint;
var bestDot = -10.0;
for (var cur : AutoWayPoint in currentWaypoint.connected) {
var direction = Vector3.Normalize(cur.transform.position - transform.position);
var dot = Vector3.Dot(direction, forward);
if (dot > bestDot && cur != currentWaypoint) {
bestDot = dot;
best = cur;

return best;
I'm amazed my head doesn't explode with this stuff lol
Right now my idiot Alien Zombies will follow me around like lost puppies... they are TOTALLY incapable at the moment of inflicting damage on my FPS player. I can't seem to figure out how to get that to work either. you see I have 4 animation states for my Alien Zombies:
is basically when he's not doing anything just standing still
For when he's on patrol around his Waypoints
For when he sees my FPS player to run towards him.
A Clawing and biting attack for when he has reached my character and this one is SUPPOSED to do damage to my FPS player
Pretty straight forward simple melee attack right? Can I get it to work? Frak no. Not finding a boat load of help at any of the places that are set up to help either. To top it off I'm still trying to learn this code stuff but code has NEVER been my strong point so that is making it extra tough. Heck I'm amazed I've come this far with the whole thing. lol

Alien Zombie Attack

Tuesday, March 22, 2011

On Screen Blood Spater Effects

Another achievment this week was discovered almost by accident. While I was searching for a way to have my Machine gun sparks particle emitter change to a green blood particle emmiter when it hits my Alien Zombie, I came accross this awesome method of creating blood splatter effects on the screen when my FPS player takes damage on Unity Answers. [link] Although it's NOT exactly what I'm after it will do for now.

Over all it a pretty cool method for creating blood effects on the screen so the more damage my FPS player takes the more opaque the blood effect becomes.

Now what would REALLY float my boat is if I can get some sort of claw marks & blood splashes to occur on the screen and get worse with the more damage my FPS player would take from attacking Alien Zombies.

I'm guessing I would need two kinds of blood effects:

1- Blood & claw effects created from attacking Zombie Aliens

2- Blood effects from just weapons fire and general player damage.

Not sure how that can be done but I'm sure there is a way. Mean while, I've still not been able to get my Alien Zombies to attack. right now they will follow me around like lost puppies when I'm within their attack range. So that's another scripting kafuddle to try and figure out. Bloody happy with the fact that I no longer have "Swimming" alien Zombies though so that progress

Friday, March 18, 2011

Zombie Alien Animation In Unity 3D a Final SUCCESS!

Finally SUCCESS!
After what has started to feel quite literally like forever with what was looking like no end and no solution in sight one of the member to Unity Answers Bunny83 gave me the solution to my ongoing character animation problem. For over a month now I had been trying to figure out how to stop my Alien Zombies imported from Max 8 into Unity 3D to stop from flipping over face down and doing their animations.

The solution, although complicated and a bit of a pain in the ass works, it actually Frakin works.
So what then was the solution you might well ask. Well it turns out that as suspected my Alien Zombie's rotation was wrong. So the way to fix it was to place my Alien Zombie inside of an empty game object and assign all the scripts to that game object. The Alien Zombie now being a "child" of that object. So the "ZombieAlienAIAnimation.js" java script needed to be changed in order to access the animations which of course are on the Alien Zombie inside of the "game object".

As you can see here the changes made to not only how my Alien Zombie is now implemented in the "Hierachy" but also the modifications made by Bunny83 now add an option in the "Inspector" view to add the "Model Animation". So that way all I had to then do was drag my "Child" Alien Zombie onto that "Model Animation" option. And it works. 

Finally after what has been like forever struggling with this blasted issue a solution. Thanks to Bunny who is absolutely brilliant for solving this problem.

Now on game play when my FPS player gets close the Zombie Alien I get a script error that reads:

Coroutine 'RunAttack' couldn't be started!

$:MoveNext() (at Assets/WeaponScripts/ZombieAlienAI.js:100)
I know why this is too. I need to modify the "ZombieAlienAI" to better suit the type of attack strategy my Alien Zombie needs to perform as this script is basically the Robot AI script from the Unity 3D FPS tutorial. All I basically did was change the animations so I've got my work cut out for me on that. I will of course need to now make another animation for my Alien Zombie to do some sort of "Claw Attack" and get that to perform damage to my FPS player somehow. Right now I'm not sure how to do that. But hopefully we will figure it out.

Ongoing Character Animation Problems

Character Set Up
OK I've been struggling with this problem for so long now with what seems like no end in sight. I thought I would take a little time and screen capture as much as possible with some explanations and see if this information help anyone to help come up with a solution to this problem.

As you can see in my first screen capture my alien starts off OK in his "T Pose" and stands up vertically. I've included as much of the setup as possible so you can hopefully see my settings. Click the image for full size view.

Firstly, I'm using MAX 8 to create my character and import from Max 8 to Unity 3D using Max's version of the FBX exporter. as you can see the FBX export options are very limited and it does not give me the option to adjust rotation of the model, which I'm beginning to suspect is where the main problem is. I tried looking to see if they have an updated version of the FBX exporter but they do not support past version 9 of MAX it seems. Software companies REALLY know how to stick it in and break it off don't they? So I'm stuck with exporting it in with this method unless there is another way that I'm not aware of?

Test Play: Now as you can see I've added his "ZombieAlienAIAnimation.js" java script and his "ZombieAlienAI" java script (Basically the same script from the FPS tutorial on Unity 3D) both of these scripts can be viewed here. on my Unity Answerer's Question.
As you can see he flips over and performs his animations and his routine of moving from one Waypoint to the next, he will even chase after my FPS controller like how you see him above. I have not given him and REAL attacking ability yet nor have I made other animations to allow him to actually attack my player yet, nor will I until I can get him to perform the most basic of functions properly.

I've included this screen capture just in case you need to see how my Alien Zombie biped is in place.
Someone had suggested placing the character inside of an empty game object and adjusting his rotation. Well I tried that and it seemed no matter what direction I rotated him he would still end up performing his animations and routine exactly like in my screen capture that shows his action in game play. Face down and swimming rather than walking!!

Here is a screen capture of the alien as he is imported into Unity 3D straight from MAX 8 using the FBX export from MAX 8. I don't know if anyone would need to see this but I have included it just the same.

Now I've included this screen capture because it shows a distinct difference in the way the Robots from the FPS tutorial on Unity 3D differ from my imported Zombie Alien. As you can see the robot is rotated sideways and my Zombie is rotated straight up. Now that could be part of the problem like I had mentioned above. but I should mention that I have tried a few other scrips on my Alien Zombies. I had one that would make them animate properly only they would not walk, they would walk "on the Spot" or "in one place" for lack of a better description. So from that I can only deduce that it must be a script problem, but I'm not a code expert so I REALLY don't know. All I do know is that I have been at this problem for well over a month now and it just gets more and more frustrating each day.

Tuesday, March 15, 2011

Alien Zombies Unity 3D Game Progress - Mar. 15, 2011

The Stone Circle UFO
While still NOT being able to solve my animation issues of trying to get my Alien Zombie character imported from Max 8 into Unity 3D to work, I thought I would work on the stuff I can for the moment. I've decided to break my game level up into smaller levels after having Unity 3D crash on me multiple times for what I'm sure are multiple reasons, most of which I'm pretty sure were to do with some of the very high poly stuff I had imported into my scene like the "Pumpkin Patch", a very high poly model, and the "Spooky Pumpkin Patch Tree" also another very high poly model, both of which were made a good many years ago when I was first learning 3D modeling using an application called Amorphium Pro. I now have Bob's Homestead, Old Barn, Windmill and old abandoned farm house all on one level. This is where the Flying Saucer crashes after launching from the ancient stone circle located by Bob's house and then crashes over the hill close to the old barn.

I had a very tough and frustrating weekend trying to figure out how to do this, but with help from Unity Answers I was able to get my UFO to take off as Bob gets close to it and then disappear over the hill range. The way I had done this first was to give the UFO a really big "Sphere collider" which was set to trigger an animation. It worked but I knew there had to be a better way to do it. I was also reading up on "Animation events" which before this weekend I knew practically nothing about. My animation for the UFO was done in Unity 3D so I knew that using "animation events" was the way to go so I also knew that I was on the right track.

After this weekend on Monday I had a major victory with some help from Unity Answers and a whole lot of digging on Google, I was finally able to have my stone circle UFO take off as Bob gets within a certain range off the craft. I also managed to have and explosion occur about midway through the UFOs flight path which knocks the UFO off trajectory and causes the UFO to crash on the other side of the hill range. Once the animation finishes it disappears and leaves behind a dead replacement "wrecked UFO". I was even able to get fire in the wreck and a Alien Zombie "Rag Doll" component which slumps over nicely into the cockpit seat when the wrecked UFO instantiates.

Now I would like to have a REALLY big explosion to occur at the end of the animation cycle as well although I'm not sure it would be seen or even hear ed given the distance away as even my "Mid Air Explosion" you kind of have to watch for even though it can be clearly seen if you watch the UFO take off. I even fixed up the green fire trail from the UFO as it takes off as well.

So it was Happy dance time after that little victory. :)

Friday, March 11, 2011

Farmer Bob's House fro my unity 3D Game

It's been another week of both victories and some ongoing frustration at still not being able to solve my Alien Zombie animation problems inside of Unity 3D. So what I decided to do was work on some stuff I can while I am still trying to find a solution to that problem which I'm sure is a java script related issue as his animations by themselves work fine until I add the modified AI script.

I made Farmer Bob's house trying to keep it simple yet still have a rustic "Redneck" sort of look to it, I still ended up with a pretty sizable 3MB file though. As you can see in my sample image (left) I've tried to give it some character and a few things that help the story of the game along like the newspaper on the table with a front cover story on UFO sightings on the increase.

With some help from Unity Answers I was able to get Bob's door to open and close using door states, and a ray cast so that way the player has to be facing the door and in close proximity in order for the door to open, and after 3 seconds close again, both door animations have a nice open and close sound effect of a old creaky door which is perfect for Bob's old house.

Next up was to make Bob's old abandoned outhouse from way back in the day before indoor plumbing, I'll just bet some of you out there are thanking whatever God you believe in that you never had to live back then and endure those hardships ;)

Now ideally what is supposed to happen here, WHEN I can get my Aliens to animate properly that is, is that Bob / the player, will go outside and hear banging coming from his old outhouse, trapped inside of the Outhouse will be one of the Zombie Aliens so Bob better have his trusty shotgun handy.

Nearby Bob's house there will be an ancient stone circle which I've still too make yet and hovering above that will be a flying saucer which when Bob gets close enough to it, it will take off straight up and then appear to have some sort of trouble and then fly off and crash over by the old abandoned farm house, barn and windmill on the other side of the mountain or hill range. (Which I may lower a bit, terrain edit stuff). That's the flying saucer you've no doubt seen me toying around with in some of my other post. now over there Bob will find the crashed saucer and a survivor of the crash Alien Zombie walking around. Now I haven't yet figured out quite how to direct the player to go over towards that direction although I think it would be a natural instinct to want to go and see where that saucer crashed, but just in case I might make the terrain such that they have to go over that direction first, although I do want my game players to have a lot of free choice as to what they would like to explore in the game. Even though some areas will be a lot more easier to deal with if you have the right weapons and enough ammo. For instance; lets say they decide to take the left path before it takes you to the saucer crash, well then the player would miss out on not only seeing the crashed saucer but would also miss out on getting more ammo for the shotgun which would be stored in the old barn somewhere, or maybe that is where the shotgun is all together ans Bob only has a 9mm pistol and a limited supply of ammo at his house. So many little details to work out but I figure I'll get to a lot of that stuff as the game develops and I test things out along the way to see what works and feels right.

Friday, March 4, 2011

My FPS Game Development Victories and set backs II

It's been a Hellish past couple of weeks struggling with trying to learn that blasted Java Script coding in Unity or I should call it "Unity Script" as it is kinda special to the application ;)

I've had some victories though this past little while, I FINALLY got my Muzzle flash on my machine gun to work properly after following some dudes video tutorial, although WHAT exactly was wrong with mine in the first place will no doubt remain an unsolved mystery as I could not see how mine was set up differently that his. What I ended up doing was just outright deleting my machine gun and started from scratch and well dag gum I'll be horn swoggled and dipped in pig drippings if that dang thing didn't just magically decide to work ;)

I also FINALLY got my Power station doors to open when you get close to them, now all I have to try and figure out is how to get the door sound to play when the doors are actually opening and not when they have finished opening which is what they are currently doing.

Since I got my Muzzle flash to work I was FINALLY able to duplicate the Automated Sentry Machine Guns and place two of them hidden by the narrow pass that leads to the power station for unwary travelers... heck I even know where they are and they kill me plenty of times while I'm testing out my game :lol:

I'm STILL trying to get my Alien Zombies to work properly though, I've gone over a dozen or so tutorial and I still end up with my Alien Zombies flipping over face down and "Swimming" rather than walking every time I add their AI script... I thought I had a breakthrough today when when I tried a different tutorial because he was standing upright and doing his "Idle" animation just fine, just fine that is until I got within his attack range and then "Flip" over he went swimming again... WTF!!

Yes I'm pulling a lot of hair out by the Frakin roots trying to solve that Frakin issue :frustrated:

UPDATE: I solved my door opening sound delay issue, as it turns out the sound I was using for my mechanical sliding doors had a slight delay at the beginning of the audio clip so it just seemed like it was starting to play after the door animation had finished. I swapped the sound for one that starts sooner and now it's OK although my animation clip could stand to be tweaked a tiny bit so its lasts about a second or so longer just to sync up with the sound clip better, but I'll call that fine tuning as I've fatter fish to fry right now :lol:

Thursday, March 3, 2011

My FPS Game Development Victories and set backs

It's Back to the "Swimming" Zombie Again!
Well it's been a very frustrating past week, just when I thought I was beginning to make some headway in solving my Alien Zombie AI script issues I'm basically back to where I started! Someone on Unity Answers had mentioned "Freezing Rotation on the Ridged Body" but my Zombie does not have a ridged body and neither do the Robots from the FPS Tutorial on Unity 3D's web site that I've been trying to get my Alien Zombies to imitate to some degree without the weapon firing aspects of the AI script, but as you can see in my sample that when I add the slightly modified AI script my Zombie flips over face down and animates that way when I test out my game play!! I've yet to be able to solve this problem, and the truly sucking part is, is that I'll bet it's something simple too like when I was having trouble with my Robot animations, it had turned out that my animations did not match the scale off my in scene robots so when the game played they looked all sort of squished and messed up. Thank god I got that fixed but this new problem is proving to be quite annoying.

On the plus side though I FINALLY got my muzzle flash to work on my machine gun, now as I had mentioned before that was an on going problem that I kept poking into again and again going over and over that FPS Tutorial till I was blue in the face trying to discover where my machine gun set up was different than the one in the tutorial and for about a month now I could not tell where mine was messed up. So while browsing the Internet yesterday looking for some kind, any kind of tutorial on getting 3D Max characters to work in Unity with AI scripts and finding a but load of Jack out there I did stumble across a adding weapons to your FPS controller video tutorial that I'm pretty sure was made by some 12 year old (I apologise if I'm wrong) lol, so anyways I take a break from my frustration and watch the video. "Hey" I says aloud to myself, "His Frakin gun is working!" So I pause the video, open up Unity3D, delete my machine gun all together and just start from scratch following what this guy is doing, and well I'll horn swoggled and dipped in pig drippings if it started working like a charm, all I had to do was add back in my machine gun sound because this guy didn't cover that part for in his video for some reason. So now at least I've gotten that sorted out so I applied the same process to my Sentry Machine gun that I had guarding the gate entrance to my military base and it is now working so I was able to duplicate that and get a few more of those around, two guarding the main gate and two more over by the base power station hidden behind some rocks for the unwary trespasser ;)

So overall it's been both a frustrating and a little bit of victory this week trying to sort some of this game development out. Meanwhile while I had been trying to sort out my Alien Zombie AI script issues I figured I would get started on "Farmer Bobs" house which is basically the starting part of my game. It's not much to look at right now as I still have a lot to do, mostly adding interior details, I'm trying not to go too overboard and keep my poly count somewhere low to medium range. I don't want to sacrifice too much quality as I want this to be a rich environment for gamers to enjoy... if it gets that far that is ;)