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.


  • Content count

  • Joined

  • Last visited

  • Days Won


Erarnitox last won the day on September 3

Erarnitox had the most liked content!

Community Reputation

71 Excellent

About Erarnitox

  • Rank
  • Birthday 07/26/1997

Profile Information

  • Gender
  • Location:
  • Interests
    Unity i guess :D

Contact Methods

Recent Profile Visitors

1,004 profile views
  1. camera effect help

    from which game is it ? if its a unity game you can grab your favourite .net decompiler and have look how they made it. If you mean the standing up animation there are two ways to do it: -change the transform of the camera using a monobehavior class (have a look at omas fps kit. i think he uses this to do the crouching proning) you will also have to programmaticly change the rotation as well. -grab your favourite animation programm like blender and animate a object to have the movement you want for your camere. Than import that into unity/ disable the renderer of the object and attach the camera as a child of that object and than script a condition on which the animation is played If you mean the Image effects of the camera have a look at the unity post processing stack. It has nearly every image effect you will ever need and is easy to set up and on top of that not very expensive on resources
  2. Script Freezing unity help!

    Can you please tell us what the problem was ? im curious
  3. How to properly save a List and load it (Inventory)

    use xenoprefs https://www.assetstore.unity3d.com/en/#!/content/91971 its made by me and works like playerprefs / saves to file and encrypts data and its also free and comes with full source access
  4. How to properly save a List and load it (Inventory)

    dont use playerprefs to save your inventory XD that would mess up the registry bigtimes
  5. How to properly save a List and load it (Inventory)

    //First of all the Saving mechanism: //String where the output will be attached: string output = null; //Loop through your list for (int i=0; i < Inventory.Count; i++){ output += Inventory[i].ToString() + "\n"; } //You need to define a ToString Method in your item class File.WriteAllText(".\\Inventory\\Save.ivt",output); //Now for the Loading if (!File.Exist(".//Inventory//Save.ivt")){ return; } //read everything from the savefile: else{ string[] loadedSave = File.ReadAllLines(".//Inventory//Save.ivt"); //do sth. with the loaded Text: for (int i = 0; i < loadeSave.Length; i++){ addToInventory(loadedSave[i]); } } // now you just need to add a method addInventory, thats takes the item name as an argument I know its kind of incomplete ... also make sure you import the dependecies for the File class (should be System.Io if im not mistaken) Hope this helped X)
  6. Script Freezing unity help!

    for me the only time that happened was when i used an infinity loop exaple: hi: //to jam it even faster we use this call the loop again. while(true){ //do something expensive this.getComponent<SomeComponent>().MethodCall("Expensive argument"); goto hi; } Since i cant spot any infinity loops in your script and also didnt saw any other problems when i had a quick look at it. I would assume that there is maybe another script that causes the problem. I also didnt get why you had to restart your pc. Didnt killing the unity process work ?
  7. Simple Pathfinding Zombie Ai

    using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; [RequireComponent(typeof(NavMeshAgent))] public class Ai : MonoBehaviour { [Header("Animated Object:")] public GameObject Anim; [Header("Animations:")] public string WalkAnim = "Walk"; public string AttackAnim = "Attack"; public string IdleAnim = "Idle"; public string SpawnAnim = "Spawn"; private Transform target = null; private Animation Anims; private NavMeshAgent Path; private bool isAttacking = false; private bool waiting = false; private bool isReady = false; void Start(){ Anims = Anim.GetComponent<Animation> (); Path = this.GetComponent<NavMeshAgent>(); StartCoroutine (Spawn ()); } // Update is called once per frame void Update () { if (isReady) { if (target == null) { //expensive lets think of sth. different here later on if (GameObject.FindWithTag ("Player") != null) { target = GameObject.FindWithTag ("Player").transform; } else { StartCoroutine (Idle ()); } } else { if (Vector3.Distance (this.transform.position, target.transform.position) < 2) { StartCoroutine (DealDamage ()); } else { Anims.CrossFade (WalkAnim); Anims [WalkAnim].speed = 1; Anims.CrossFade (WalkAnim); Anims.Play (WalkAnim); Path.destination = target.position; } } } } IEnumerator DealDamage (){ if (!isAttacking) { isAttacking = true; Anims.CrossFade (AttackAnim); Anims [WalkAnim].speed = 4; Anims.CrossFade (AttackAnim); Anims.Play (AttackAnim); target.GetComponent<PlayerHealth> ().PlayerDamage (20); yield return new WaitForSeconds(0.7f); isAttacking = false; } } IEnumerator Idle(){ if (!waiting) { waiting = true; Anims.CrossFade (IdleAnim); Anims [IdleAnim].speed = 1; Anims.CrossFade (IdleAnim); Anims.Play (IdleAnim); yield return new WaitForSeconds(3.0f); waiting = false; } } IEnumerator Spawn(){ Anims.Play (SpawnAnim); yield return new WaitForSeconds((float)SpawnAnim.Length); isReady = true; } } there you go XD hope you got it working now
  8. Simple Pathfinding Zombie Ai

    dude XD just enter the name of the script (looks like it is actually called PlayerHealth from the error) and the methode that handles the damage (maybe applydamage ?) with the argument it takes (most likely the damage you want to deal as int) for egs: PlayerHealth.ApplyDamage(20); //if it takes an int PlayerHealth.ApplyDamage(20.0f) //if it dakes a float (doubles are pretty uncommon in game development) more generally: <class name>.<public method you want to use>(<arguments>);
  9. Simple Pathfinding Zombie Ai

    Should be sth. like : PlayerHealthScript.ApplyDamage(20); if i remebre correctly. just take a look in the class where your health gets managed and search for the methode that deals damage. than just call that method from the ai script. If you dont understand that, you should be able to figure that out pretty fast by googleing. iwould also suggest you to watch trough a beginner java tutorial series that focuses on oop
  10. hey :) i got into some wierd problem in Java

    Thanks Found the Solution: Im just plain stupid XD the problem wasnt the return value it was the position of the reader and since i have used it and didnt reset it tried to read lines at the bottom of the file, where there are none XD oh man i should invest in a new brain
  11. hey :) i got into some wierd problem in Java

    yeah it returns the right value ... thats also true for me. but creating an array with that number casted to int didnt work :/ anyways thanks for the help :), i will try to debug it step by step and keep log of everything and see what exactly is going on will inform you here what the problem was once i solved why java tries to trigger me XD
  12. hey :) i got into some wierd problem in Java

    also using eclipse .... its for a decentralised chatting system and im playing around with the network infrastructure a bit ... this try is a broadcast approach (listen to one port, send to all nodes in the "channel" )
  13. hey :) i got into some wierd problem in Java

    just returns 4 as a long as expected than (int) br.lines().count() should just return 4 as an int and it does but somehow it just works if i literally type in 4 instead :/
  14. Hello form Germany - Munich

    hey, welcome ive been to munich recently. Been to Dachau KZ ... Holy F*** prison really is a 5 start hotel in comparison
  15. hey :) i got into some wierd problem in Java

    it reads from a .txt file. And also it's not in a loop. Also it doesnt even work when i try sth. like: while(br.readline() != null) ++x; even tho. x is also 4 afterwards .... but if i just do x = 4 everything works just fine... and i have no clue what the f***ing problem is Edit: You should know that x is used to create 2 arrays in the next lines: String IP_Addys[] = new String[x]; String Ports[] = new String[x]; maybe the real problem is in those lines ?