UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


FPS KIT (V. 0.1) FROM FPS TUT 6

power_settings_newLogin to reply
+31
c0unterf0x
fiflak77
ItsMarineNoob
pito2901
WolfSmartGames
vrgamegirl1984@gmail.com
voodoo664
ksouztt
Cjrobinson505
NewDeveloper
Manish Thakur
Sai Srinivas
harsh(Amuser)
jayreckz01
justusingthisforassets
Alvbatross
AndrewIsAwesome
gavanescu
mahindrags
DarkHunter
spongebhoy
developer23
Oshi
MarsIndustries
imbestone
baguy
Soapkiller3
Blasthappy
ros0005
slitit
MisterNinjaBoy
35 posters

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
My enemy dont KILL me !!!
HELP
!!!

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
Manish Thakur, if you need any help then please make a new topic in the Help(General) section of the forum.

--New Developer

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
Whenever I try and download from this forum the tab opens, loads for a while then either says that the link doesn't exist or the page is temporararily busy???

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
For some reason my camera for zooming in is default for when i start the game, any idea on why?

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyMuch Needed!

more_horiz
Thank you i will use some of the rayscript code so that i can see an example so i can update my code!
Great work keep on posting these freebies i hate using the slow unity asset store for unity 4, I will credit you in the credits!

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyHow to add animations to the Enemy AI script???

more_horiz
I got this working but I would like an actual enemy like a zombie, that has animations. So instead of the

Code:

renderer.material.color = Color.red;


I would like something like:

Code:


animation.Play("run");


but when I add put that into the script, nothing happens. My enemy doesn't even move toward me.

This is what I change the script to:

Code:

//IMPORTANT NOTE! THIS SCRIPT WAS MADE IN VIDEO NUMBER 21! CHECK OUT THE EARLIER VERSION (NOT V2) IF YOU HAVEN'T REACHED THAT VIDEO.

var Distance;
var Target : Transform;
var lookAtDistance = 25.0;
var chaseRange = 15.0;
var attackRange = 1.5;
var moveSpeed = 5.0;
var Damping = 6.0;
var attackRepeatTime = 1;

var TheDammage = 40;

private var attackTime : float;

var controller : CharacterController;
var gravity : float = 20.0;
private var MoveDirection : Vector3 = Vector3.zero;

function Start ()
{
   attackTime = Time.time;
   animation.Play("idle01");
}

function Update ()
{
   if(RespawnMenuV2.playerIsDead == false)
   {
      Distance = Vector3.Distance(Target.position, transform.position);
      
      if (Distance < lookAtDistance)
      {
         lookAt();
      }
      
      if (Distance > lookAtDistance)
      {
         animation.Play("idle01");
         //renderer.material.color = Color.green;
      }
      
      if (Distance < attackRange)
      {
         animation.Play("attack01");
         //attack();
      }
      else if (Distance < chaseRange)
      {
         animation.Play("run");
         //chase ();
      }
   }
}

function lookAt ()
{
   animation.Play("caution");
   //renderer.material.color = Color.yellow;
   var rotation = Quaternion.LookRotation(Target.position - transform.position);
   transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping);
}

function chase ()
{
   animation.Play("run");
   //renderer.material.color = Color.red;
   
   moveDirection = transform.forward;
   moveDirection *= moveSpeed;
   
   moveDirection.y -= gravity * Time.deltaTime;
   controller.Move(moveDirection * Time.deltaTime);
}

function attack ()
{
   if (Time.time > attackTime)
   {
      Target.SendMessage("ApplyDammage", TheDammage);
      Debug.Log("The Enemy Has Attacked");
      attackTime = Time.time + attackRepeatTime;
   }
}

function ApplyDammage ()
{
   chaseRange += 30;
   moveSpeed += 2;
   lookAtDistance += 40;
}



What am I doing wrong??? I have a animation controller attached to my enemy with all the animations...

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
Soapkiller3 wrote:
How come it wont download it?????? Mad Mad Question Question pale pale 


Add Fly Was Shutdown I think, also addblock blocks addfly at times

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
Thanks !

How do you animate the enemy soldier ? (Actually, about the target script...)

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
iT DOESN'T LET ME IMPORT.

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
I need help!

Assets/Tutorial 5/Tutorial 5/Scripts/Player/RespawnMenuV2.js(6,20): BCE0018: The name 'MouseLook' does not denote a valid type ('not found'). Did you mean 'UnityStandardAssets.Characters.FirstPerson.MouseLook'?

Can anybody help me?

descriptionFPS KIT (V. 0.1) FROM FPS TUT 6 - Page 5 EmptyRe: FPS KIT (V. 0.1) FROM FPS TUT 6

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply