Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'ai'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 48 results

  1. Version 1.0

    33 downloads

    From this project you can learn how to create/destroy and synchronize AI. PUN2 documentation: https://doc.photonengine.com/en-us/pun/v2/getting-started/pun-intro If you have any questions: https://armedunity.com/forum/27-need-help/ Requires: - unity 2018 or higher - PUN 2 v2.7 or higher How to open project: 1. Create new project 2. Import and setup "PUN 2" from unity Asset Store 3. Download, extract from archive and import AU_PUN_2_NPC 4. Add scenes in Build Settings IMPORTANT: You are not allowed to share project outside armedunity (upload on other sites)
  2. 1. Add this code on Ienumerator ApplyDamage in BulletScript.cs. if (hit.transform.tag != friendlyTag) { //Addthis if (hit.collider.gameObject.GetComponent<HealthScript>()) { hit.collider.gameObject.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(damage)); } // hit.collider.SendMessage(damageMethodName, damage, SendMessageOptions.DontRequireReceiver); } 2. Add this code on IEnumerator Go() in ExplosionScript.cs if (hit.GetComponent<Collider>().gameObject.GetComponent<HealthScript>()) { hit.GetComponent<Collider>().gameObject.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(damage)); } 3. Replace this in TargetScript.cs public void ApplyDamage(float h) { if (healthScriptHolder.GetComponent<HealthScript>()) { healthScriptHolder.GetComponent<HealthScript>().PlayerDamage(System.Convert.ToInt32(h)); } healthScriptHolder.SendMessage("Damage", h, SendMessageOptions.DontRequireReceiver); } 4. Change Player layer to default, Click this object only. 5. Change Damage Method Name to ApplyDamage, and Hit Effect Tag to Enemy on TSA bullet prefabs. Also on TSA Explosion Prefabs 6. Change AI prefab Tag to Enemy, which have collider component. And Apply Prefab. Noooww it's done. + You need to change TSA HealthScript.cs name, cuz it has same name as HealthScript.cs on FPS kit.
  3. Hallo i have a problem with the zombie ai when it gets to me it rotating like on the Image down below and here is the script so all can see that (It is the Brackeys AI) //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; } function Update () { Distance = Vector3.Distance(Target.position, transform.position); if (Distance < lookAtDistance) { lookAt(); } if (Distance > lookAtDistance) { //renderer.material.color = Color.green; } if (Distance < attackRange) { attack(); } else if (Distance < chaseRange) { chase (); } } function lookAt () { var rotation = Quaternion.LookRotation(Target.position - transform.position); transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping); } function chase () { 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; }
  4. roderick433

    AI and sight

    AI today it's really important. That's why I want to ask you: What's is the method that you would use to add sight to an enemy? In my game, the enemy is a guard, I want to detect the player if seen. I've watched many tutorials, and ways to achieve this, however I do not know the "best practices". Thanks in advance!
  5. Here is the code of Health Script of my Player and the name of my player health script is HealthingScript my AU_FPS Kitv1.5 and another code is of my AI`s bullet script. I don`t know how to receive Damage from AI, Please help me I want to upload my #1 Fps update on Youtube. My player tag is "Player" function PlayerDamage (damage : int) { if (hitPoints < 0.0) return; hitPoints -= damage; aSource.PlayOneShot(painSound, 1.0); t = 2.0; if (hitPoints <= 0.0) Die(); } using UnityEngine; using System.Collections; /* * Moves an object until it hits a target, at which time it calls the Damage(float) method on all scripts on the hit object * Can also home in on targets and "detonate" when in close proximity. * */ namespace TacticalAI { public class BulletScript : MonoBehaviour { public string damageMethodName = "Damage"; public float speed = 1000; public LayerMask layerMask; public float maxLifeTime = 3; //Bullet Stuff public float damage = 16; //use for shotguns public float bulletForce = 100; //Hit Effects public GameObject hitEffect; public float hitEffectDestroyTime = 1; public string hitEffectTag = "HitBox"; public GameObject missEffect; public float missEffectDestroyTime = 1; public float timeToDestroyAfterHitting = 0.5f; private RaycastHit hit; private Transform myTransform; //Rotation private Quaternion targetRotation; private Transform target = null; public float homingTrackingSpeed = 3; public float minDistToDetonate = 0.5f; private float minDistToDetonateSqr; public string friendlyTag; void Awake() { myTransform = transform; Move(); StartCoroutine(SetTimeToDestroy()); } //Automatically destroy the bullet after a certain amount of time //Especially useful for missiles, which may end up flying endless circles around their target, //long after the appropriate sound effects have ended. IEnumerator SetTimeToDestroy() { yield return new WaitForSeconds(maxLifeTime); if (target) { Instantiate(hitEffect, myTransform.position, myTransform.rotation); } Destroy(gameObject); } IEnumerator ApplyDamage() { //Reduce the enemy's health //Does NOT travel up the heirarchy. if (hit.transform.tag != friendlyTag) { Uncomment for RFPS if (hit.collider.gameObject.GetComponent<FPSPlayer>()) { hit.collider.gameObject.GetComponent<FPSPlayer>().ApplyDamage(damage); } hit.collider.SendMessage(damageMethodName, damage, SendMessageOptions.DontRequireReceiver); } //Produce the appropriate special effect if (hit.transform.tag == hitEffectTag && hitEffect) { GameObject currentHitEffect = (GameObject)(Instantiate(hitEffect, hit.point, myTransform.rotation)); GameObject.Destroy(currentHitEffect, hitEffectDestroyTime); } else if (missEffect) { GameObject currentMissEffect = (GameObject)(Instantiate(missEffect, hit.point + hit.normal * 0.01f, Quaternion.LookRotation(hit.normal))); GameObject.Destroy(currentMissEffect, missEffectDestroyTime); } this.enabled = false; yield return null; //Wait a fram to apply forces as we need to make sure the thing is dead if (hit.rigidbody) hit.rigidbody.AddForceAtPosition(myTransform.forward * bulletForce, hit.point, ForceMode.Impulse); //Linger around for a while to let the trail renderer dissipate (if the bullet has one.) Destroy(gameObject, timeToDestroyAfterHitting); } // Update is called once per frame void Update() { Move(); } //Move is a seperate method as the bullet must move IMMEDIATELY. //If it does not, the shooter may literally outrun the bullet-momentarily. //If the shooter passes the bullet, the bullet will then start moving and hit the shooter in the back. //That would not be good. void Move() { //Check to see if we're going to hit anything. If so, move right to it and deal damage if (Physics.Raycast(myTransform.position, myTransform.forward, out hit, speed * Time.deltaTime, layerMask.value)) { myTransform.position = hit.point; StartCoroutine(ApplyDamage()); } else { //Move the bullet forwards transform.Translate(Vector3.forward * Time.deltaTime * speed); } //Home in on the target if (target != null) { //Firgure out the rotation required to move directly towards the target targetRotation = Quaternion.LookRotation(target.position - transform.position); //Smoothly rotate to face the target over several frames. The slower the rotation, the easier it is to dodg. transform.rotation = Quaternion.Slerp(transform.rotation, targetRotation, homingTrackingSpeed * Time.deltaTime); Debug.DrawRay(transform.position, (target.position - transform.position).normalized * minDistToDetonate,Color.red); //Projectile will "detonate" upon getting close enough to the target.. if (Vector3.SqrMagnitude(target.position - transform.position) < minDistToDetonateSqr) { //The hitEffect should be your explosion. Instantiate(hitEffect, myTransform.position, myTransform.rotation); GameObject.Destroy(gameObject); } } } //To avoid costly SqrRoot in Vector3.Distance public void SetDistToDetonate(float x) { minDistToDetonateSqr = x * x; } //Call this method upon instantating the bullet in order to make it home in on a target. public void SetAsHoming(Transform t) { target = t; SetDistToDetonate(minDistToDetonate); } } } in code there is word(FPSPlayer) i don`t what is that? How to give damage to player? Any help and answer is appreciated here. Thanks
  6. I want to use the tactical shooter against my Player(FPSController), I had setup the scene with player and AI but it`s only shooting on me and can`t moving around so that whenever I go it follow me. I wanna make that when I shoot AI then it will take damage and when it shoot me it then I will take damage. My gun script and health script is taken from OneManArmy3d`s Au fps kit v1.5. If you want this package ask me I `ll give u. Please help me!
  7. Here is a pretty simple ZombieAi Script i made to make use of Unitys NavMesh It should be pretty easy to set up ( your player should have be tagged as: "Player" and you might also want to change the line where damage is delt to fit ur project)
  8. Assasin

    Soldier AI

    Hi Guys I want to make this AI for My game. Pleas help ! https://youtu.be/IKUS2OEaV2c I need it
  9. Hello, I want to limit the AI to something like this How would I do something like that? I have no clue how to limit it like that. I want the red to only be able to move inside the painted red squares, and blue inside the painted blue squares Anyone have any idea how I would do this? If there's some important information I missed, please tell and I'll add more information
  10. Hello i have probleme . on my game i want to add AI , i have tactical shooter AI but i dont know how to integrate this asset on my game , i have try but i never do damage to the AI . Somone can help me pls ? Thank.Insert other media
  11. Hi I'm integrating a very simple ai into my project and i'm using fps tutorial from nutiy converted by oma... I managed to make my agents to work and i can kill them and they can kill me etc.. but i cannot figured how i can have differet animations fro walk an run when i need them.. i have this script for my agent ai var Damage : float = 1; var speed = 3.0; var rotationSpeed = 5.0; var shootRange = 15.0; var attackRange = 30.0; var shootAngle = 10.0; var dontComeCloserRange = 5.0; var delayShootTime = 0.35; var pickNextWaypointDistance = 2.0; var target : Transform; private var lastShot = -10.0; //Modifications private var hitParticles : ParticleEmitter; var muzzleFlash : Renderer; var bulletsPerClip = 40; var clips = 20; var reloadTime = 0.5; private var bulletsLeft : int = 0; private var nextFireTime = 0.0; private var m_LastFrameShot = -1; var force = 10.0; var range = 100.0; var chasing : boolean = false; // 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; hitParticles = GetComponentInChildren(ParticleEmitter); // We don't want to emit particles all the time, only when we hit something. if (hitParticles) hitParticles.emit = false; Patrol(); } 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 MoveTowards(waypointPosition); yield; } } function CanSeeTarget () : boolean { if (target == null) return; 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 LateUpdate() { if (muzzleFlash) { // We shot this frame, enable the muzzle flash if (m_LastFrameShot == Time.frameCount) { muzzleFlash.transform.localRotation = Quaternion.AngleAxis(Random.value * 360, Vector3.forward); muzzleFlash.enabled = true; if (GetComponent.<AudioSource>()) { if (!GetComponent.<AudioSource>().isPlaying) GetComponent.<AudioSource>().Play(); GetComponent.<AudioSource>().loop = true; } } else { // We didn't, disable the muzzle flash muzzleFlash.enabled = false; enabled = false; // Play sound if (GetComponent.<AudioSource>()) { GetComponent.<AudioSource>().loop = false; } } } } function Shoot () { var direction = transform.TransformDirection(Vector3.forward); var hit : RaycastHit; // Did we hit anything? if (Physics.Raycast (transform.position, direction, hit, range)) { // Apply a force to the rigidbody we hit if (hit.rigidbody) hit.rigidbody.AddForceAtPosition(force * direction, hit.point); // Place the particle system for spawing out of place where we hit the surface! // And spawn a couple of particles if (hitParticles) { hitParticles.transform.position = hit.point; hitParticles.transform.rotation = Quaternion.FromToRotation(Vector3.up, hit.normal); hitParticles.Emit(); } } // Start shoot animation GetComponent.<Animation>().CrossFade("shoot", 0.01); GetComponent.<AudioSource>().Play(); // Wait until half the animation has played //yield WaitForSeconds(delayShootTime); /* // Fire gun BroadcastMessage("Fire"); */ //target.SendMessage("Fire", SendMessageOptions.DontRequireReceiver); target.SendMessage("PlayerDamage", Damage, SendMessageOptions.DontRequireReceiver); // Wait for the rest of the animation to finish //yield WaitForSeconds(GetComponent.<Animation>()["shoot"].length - delayShootTime); // Register that we shot this frame, // so that the LateUpdate function enabled the muzzleflash renderer for one frame m_LastFrameShot = Time.frameCount; enabled = true; if (target == null) return; } function AttackPlayer () { var lastVisiblePlayerPosition = target.position; while (true) { if (CanSeeTarget ()) { // Target is dead - stop hunting if (target == null) return; // Target is too far away - give up var distance = Vector3.Distance(transform.position, target.position); if (distance > shootRange * 3) return; lastVisiblePlayerPosition = target.position; if (distance > dontComeCloserRange) MoveTowards (lastVisiblePlayerPosition); else RotateTowards(lastVisiblePlayerPosition); var forward = transform.TransformDirection(Vector3.forward); var targetDirection = lastVisiblePlayerPosition - transform.position; targetDirection.y = 0; var angle = Vector3.Angle(targetDirection, forward); // Start shooting if close and play is in sight if (distance < shootRange && angle < shootAngle) yield StartCoroutine("Shoot"); } else { yield StartCoroutine("SearchPlayer", lastVisiblePlayerPosition); // Player not visible anymore - stop attacking if (!CanSeeTarget ()) return; } yield; } } 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) { MoveTowards(position); // We found the player if (CanSeeTarget ()) return; timeout -= Time.deltaTime; yield; } } function RotateTowards (position : Vector3) { SendMessage("SetSpeed", 0.0); var direction = position - transform.position; direction.y = 0; if (direction.magnitude < 0.1) return; // 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); return; } // 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; } and i have my agent to sooht ehen he spot the player and in range.. but how can i manage to make agent walk when use waypont and run towards the player when it spot the player? i tried with GetComponent.<Animation>().CrossFade("run", 0.3); GetComponent.<Animation>().CrossFade("walk", 0.3); and with SendMessage("SetSpeed", 4.0); lines of code but cannot managed to work animations names are simply walk, run, shoot any help is appreciated..
  12. Hi ,as i wrote in a prevoius topic I'm learning and experimenting with great oma fps kit 1.5 c# version now i'm trying to add a form of simple AI and I'm trying to add classic zombie ai form fpskit 1.3.5 i copied all (scripts asset nanimations ect_) and all works fine except fot the fact that when my player die and there are more zombies on the scene my test game got an error MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Transform.get_position () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineTransformBindings.gen.cs:26) AI.Update () (at Assets/MyEnemies/Zombie/AI.cs:47) realted to my zombie AI.cs due to the fact that zombie try to check the distance to the player but the "player" in not in scene this is the script using UnityEngine; using System.Collections; public class AI : MonoBehaviour { public Transform target; //the enemy's target public float moveSpeed = 3; //move speed public float rotationSpeed = 3; //speed of turning public float attackRange = 3; // distance within which to attack public float chaseRange = 10; // distance within which to start chasing public float giveUpRange = 20; // distance beyond which AI gives up public float attackRepeatTime = 1.5f; // delay between attacks when within range public GameObject anim; public float maximumHitPoints = 5.0f; public float hitPoints = 5.0f; public AudioClip attack; private bool chasing = false; private float attackTime; public bool checkRay = false; public string idleAnim = "idle"; public string walkAnim = "walk"; public string attackAnim = "attack"; public int dontComeCloserRange = 4; private Transform myTransform; //current transform data of this enemy void Awake() { myTransform = transform; //cache transform data for easy access/preformance anim.GetComponent<Animation>().wrapMode = WrapMode.Loop; anim.GetComponent<Animation>()[attackAnim].wrapMode = WrapMode.Once; anim.GetComponent<Animation>()[attackAnim].layer = 2; anim.GetComponent<Animation>().Stop(); } void Start() { target = GameObject.FindWithTag("Player").transform; } void Update() { // check distance to target every frame: float distance = (target.position - myTransform.position).magnitude; if (distance < dontComeCloserRange) { moveSpeed = 0; anim.GetComponent<Animation>()[idleAnim].speed = .4f; anim.GetComponent<Animation>().CrossFade(idleAnim); } else { moveSpeed = Random.Range(4, 6); anim.GetComponent<Animation>().CrossFade(walkAnim); } if (chasing) { //move towards the player myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime; //rotate to look at the player myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed * Time.deltaTime); transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0); // give up, if too far away from target: if (distance > giveUpRange) { chasing = false; } // attack, if close enough, and if time is OK: if (distance < attackRange && Time.time > attackTime) { anim.GetComponent<Animation>()[attackAnim].speed = 2.0f; anim.GetComponent<Animation>().CrossFade(attackAnim); target.SendMessage("PlayerDamage", maximumHitPoints); attackTime = Time.time + attackRepeatTime; GetComponent<AudioSource>().PlayOneShot(attack, 1.0f / GetComponent<AudioSource>().volume); } } else { // not currently chasing. anim.GetComponent<Animation>()[idleAnim].speed = .4f; anim.GetComponent<Animation>().CrossFade(idleAnim); // start chasing if target comes close enough if (distance < chaseRange) { chasing = true; } } } void OnDrawGizmosSelected() { Gizmos.color = Color.yellow; Gizmos.DrawWireSphere(transform.position, attackRange); Gizmos.color = Color.red; Gizmos.DrawWireSphere(transform.position, chaseRange); } } can please someone try to help me to fix this error?' many thanks in advance
  13. Hello people. This is a Simple enemy Ai using Navmesh for navigation. I have written in the script, what the the different things do, so its easy enough to find out what the AI does. The only thing you need to do is to place the script on your AI. Add the (Nav Mesh Agent) component to your AI, and set the (Nav Mesh Agents) stopping distance to 2, and you are done. ////////////////////////////////////////////////////////////////////////////////////// /// /// /// /// /// AI Script Written by mikkel1265 /// /// /// /// /// ////////////////////////////////////////////////////////////////////////////////////// var Distance; var Target : Transform; var lookAtDistance = 25.0; //when the AI starts to look at the player var chaseRange = 10.0; //when the AI starts to chase the player var attackRange = 2; // when the AI stars to attack the player var moveSpeed = 4.0; var Damping = 6.0; var attackRepeatTime = 3; var TheDamage = 20; // how much damage the AI gives private var attackTime : float; var gravity : float = 20.0; function Awake() { Target = GameObject.FindWithTag("Player").transform; } function Start () { attackTime = Time.time; } function Update () { Distance = Vector3.Distance(Target.position, transform.position); if (Distance < lookAtDistance) { lookAt(); } if (Distance > lookAtDistance) { //renderer.material.color = Color.green; // if you want the AI to be green when it not can see you. } if (Distance < attackRange) { attack(); }else{ } if (Distance < chaseRange) { chase (); } } function lookAt () { //renderer.material.color = Color.yellow; //if you want the AI to be yellow when it have spottet you. var rotation = Quaternion.LookRotation(Target.position - transform.position); transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping); } function chase () { this.GetComponent(NavMeshAgent).destination = gameObject.Find("Player").transform.position; //renderer.material.color = Color.red; //if you want the Ai to be red when it are chasing you. } function attack () { if (Time.time > attackTime) { Target.SendMessage("ApplyDamage", TheDamage); Debug.Log("The Enemy Has Attacked"); attackTime = Time.time + attackRepeatTime; } } function ApplyDammage () // To give a effect thet the AI have been hurt, so it lose movespeed, but it are angry at you so it want to catch you. { chaseRange += 5; moveSpeed -= 1; lookAtDistance += 5; } The AI helath/damage is in another script and thats just a simple if (health <= 0) Destroy (gameObject); script, but if in some way you want it just pm me. Its my first script i post here, so i hope you like it.
  14. Hi all! As you see, im selling a chatbot for 20$ Its really good, and you can see it, just contact me on skype : Kriss7209 and i will send you the exe. Have a nice day
  15. Hey folks! Im selling a great AI Chat bot for only 15$, but if you want it for a lower price we can deal it, dont worry im a cool guy, hah Its really smart, it can be your best friend! Just kidding Here are some of its features: -Full source code -Advanced and talkable artificial intelligence -Learning system -Remembering system -Many bugs fixed -Advanced personal information telling system -Friendly environment -Basic knowledge of celebs and objects -Knowledge of the meanings of things If you want to see what it looks like before buy it contact me on skype: Skype:kriss7209
  16. Hi all,I've improved the AI in the kit, did the patrol around obstacles, etc . I Made conditions to attack other objects with life or destructible, but my method only works if I insert target for attack in inspector , how do I make the AI pick out your own target, place it in the target variable? The trigger is not suitable, because it will affect optimization! Raycast, also do not go, you need something spherical! I just need to insert into a variable, the object(with the specified for the interaction of the tag) for this purpose and update it if someone came into the area. Or is there a way to do this using vectors? If someone knows a way to write! Write if you know something for example. Thanks in advance! All the best .
  17. Fantasy AI 2.0 has finally arrived! With ground breaking new features such as navigational mesh generation with smooth path-finding, easy character rigging system, and improved combat and animation system. Fantasy AI 2.0 includes a full game project called 'Protect The Crystal', it's fun and addictive, and can give you a great start to your fantasy style game! This AI is 100% ready for action out of the box. Rig your characters in minutes and watch them perform tasks intelligently. Custom designed high fidelity sound FX and music are included with this product for you to use as you please. Here is your one and only, Fantasy based AI solution. Visit the Unity Forum Thread to try 'Protect The Crystal' or view videos & screenshots. It´s free > Link: http://bit.ly/1SBFn7C Images It helped him, like!
  18. Based in the question above, What's the best way to do this? Communicating between entities, is using FindGameObjectsByTag() efficient? If yes, should I cache it in an array and use foreach() to find the nearest entity? Or is there another way?
  19. I am a newbie to AI and in need of help. I have basic C# and JAVA Knowledge and I Know Unity pretty well. The question is, Should I use any AI kit?,(I've Tried Shooter AI) but cant seem to get likable results. Is There any better Kit or Any better solution. As my game is survival-Horror I want some Good Zombie AI.
  20. Hello, I am trying to expand knowledge about League of Legends minion patterns. The main info source is here at the moment : http://leagueoflegends.wikia.com/wiki/Minion But this page content is very superficial : I would like to understand much more in-depth how minion aggro works. Trying to be more explicit, I am aiming at call for help / aggro scan / attack flag specifics. Maybe drawing parallels, with other major MOBAs, where source code is known, like DOTA? Possibly getting experience, from someone having developped minions laning before? I wish you could help me out, Thank you for your answers! A LoL amateur.
  21. http://www.attiliocarotenuto.com/83-articles-tutorials/unity/292-unity-3-moving-a-npc-along-a-path can any one put this into a script for me. I just put everything onto a single js file. but having a lot of errors.
  22. Hey Guys, I've done the basic NavMesh movements to a static target, now how can i make that into a roaming thing ( my idea is - after spawning AI's they'll roam around in the maze for a random time based on a timer then go to the target ) somewhat like Pacman Ghost, So any idea how to archive this ? Thanks in advance
  23. Hey guys, So, after days and days of work, I finally have something to show. This is a RPG Game Project that I'm working on right now. The footage from the video is from the somewhat older build of the game, so somethings are not the same any more. Features - Update #1: Features - Updates #2: The game is set to be a open world sandbox role playing game, with a main story line followed by side quests and tasks. This is the list of the features I will be looking to implement: - Store and bartering system - Voiced dialog system (Done) - Quest system Those are my priorities at the moment. Video Update #1: Video Update #2 So, thats it for now.
  24. someone will have a script for the enemy patrol and if you see me (player) attack me and been trying to make one but nothing gives me many errors and I searched the net but have had no luck. support for the enemy ai I've been learning some java script, leave my script for you to see and if they find several erroes please let me know my script: # pragma strict var targetCollider: GameObject; var targetBoolean: boolean = false; var enemy: GameObject; var Attack: AnimationClip; // Deve equal the name of the animation var Idle: AnimationClip; // Idle animation var Run: AnimationClip; // animation run var speed: float = 5f; var wp1: GameObject; var wp2: GameObject; var wp3: GameObject; var WP4: GameObject; function Start () { } Update function () { if (targetBoolean == true) { Debug.log ("I see"); animation.Play ("Attack"); // remember the name of the animation as animation clip arrives } else { Debug.log ("pa where you left"); animation.Play ("Idle"); // idle animation } if (targetBoolean == false) { Enemigo.transform.position = Vector3.Lerp (Enemigo.transform.position, wp1.transform.position, Time.deltaTime * speed); } } OnTriggerEnter function (targetCollider: Collider) { targetBoolean = true; } OnTriggerExit function (targetCollider: Collider) { targetBoolean = false; }
  25. This is my first project that i'm actually taking seriously, I've been working on this for about a year. It's gone through LOTS of different designs and etc. but hope you enjoy the small teaser, it really won't show much but I hope you can check it out. >>>>>Click Here For Trailer<<<<<
×
×
  • Create New...