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.

RanBowJet

Newbie
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

0 Neutral

About RanBowJet

  • Rank
    Newbie
  • Birthday 03/17/2000

Profile Information

  • Gender
    Male
  • Location:
    Germany
  1. Hello armedunity forum, I have one short question to you. Have one of you the android obb file from the free android game: "Star Wars™: Galaxy of Heroes "? (I'm asking this, because my android phone is broken and my Iphone can't extract the .obb file from this game. And no page offers it, only the .apk) If one of you have the obb file, or would download and extract the obb file from this game, and then upload it, would it be very awesome it would help me a lot. Thanks
  2. Character Avatar - Help

    Thanks for your answer, my character don't have any .fbx, .obj etc format files, all the meshes are .asset files. Because I'm using a character creator tool, there export the daz character meshe's as unity .asset files & it put the character as a .prefab in a unity scene. So I have only the .asset meshes, textures, animation's & the prefab in the scene. Is there a way to use the rigged prefab character as a mecanim player?
  3. Character Avatar - Help

    Hello armedunity forum, I have a short question to the character/player avatar. I have one rigged legacy character with legacy animations, the char & anim's working perfect. But the char doesn't have a fbx, only single mesh. So I'm not able to generate a Avatar, and I can't convert the character to a mecanim character without avatar. I have only the prefab in my scene and the single mesh in my asset folder. So I wan't to make the character playable with mecanim animations. My question is, is there a way to fix this problem? Picture from my rigged character .prefab in the scene: Thanks:)
  4. Thanks for your answer, yeah the method could help me. But the tool that I have used to make the character, only creates the skeleton, mesh and the unity prefab, not one fbx or obj etc. So the compiled character are in a .prefab file, do you know a other method?
  5. Hi armedunity forum, I have a short question. I have created a character with many clothings, so first the jeans (in the picture) are perfect rigged with the character, he will follow him perfect. But only the skin looks out of the clothing. My question is, how can I fix that? Picture: Thanks;)
  6. Unity Update Mode - Help

    Hello Armedunity forum, I have one question to the Unity update mode. Question: How can I switch from the animation update mode "Animate Physics" to "normal" and then automatically back to "Animate Physics" again with a UI button click? So via a UI button, switching the animator from "Animate Physics" to "normal" and then automatically back to "Animate Physics" again. From"Animate Physics": To "normal" and then automatically back to "Animate Physics" again. It would be cool if one can help me with that;) Thanks
  7. I have created a own code, so it woks now.
  8. Hey, I have a question to a function, it wourld be cool if you can help me. I wourld insert a function to change the animation controller for 20 secounds from the selected player, if the player shoot/hit at enemy. And then will it switch back to the old animation controller, so after 20 secounds. So, the player has a normal idle, walk, meele attack in the first animation controller. And if the player hit the enemy will the first normal animation controller switch to the other controller with the attack idle, attack walk etc and after 20 secounds is the normal animation controller back. So the player have again the normal animations. Do you know how can I make it? The code: using UnityEngine; using System.Collections; public class BulletStatusC : MonoBehaviour { public int damage = 10; public int damageMax = 20; [HideInInspector] public int playerAttack = 5; public int totalDamage = 0; public int variance = 15; [Range(0, 100)] public int criticalChance = 0; public string shooterTag = "Player"; [HideInInspector] public GameObject shooter; public Transform Popup; public GameObject hitEffect; public bool flinch = false; public bool penetrate = false; private string popDamage = ""; public AtkType AttackType = AtkType.Physic; public Elementala element = Elementala.Normal; [Range(0 , 100)] public int drainHp = 0; public BombHit bombHitSetting; //----------------------------- void Start(){ if(variance >= 100){ variance = 100; } if(variance <= 1){ variance = 1; } } public void Setting(int str , int mag , string tag , GameObject owner){ //print ("GuSetLaew"); if(AttackType == AtkType.Physic){ playerAttack = str; }else{ playerAttack = mag; } shooterTag = tag; shooter = owner; int varMin = 100 - variance; int varMax = 100 + variance; int randomDmg = Random.Range(damage, damageMax); totalDamage = (randomDmg + playerAttack) * Random.Range(varMin ,varMax) / 100; } void OnTriggerEnter(Collider other){ //When Player Shoot at Enemy if(shooterTag == "Player" && other.tag == "Enemy"){ Transform dmgPop = Instantiate(Popup, other.transform.position , transform.rotation) as Transform; if(criticalChance >= 1){ if(criticalChance >= 100){ criticalChance = 100; } int per = Random.Range(0, 100); if(per <= criticalChance){ if(Camera.main.GetComponent<ARPGcameraC>()) Camera.main.GetComponent<ARPGcameraC>().Shake(0.5f , 0.35f); dmgPop.GetComponent<DamagePopupC>().critical = true; totalDamage *= 2; } } if(AttackType == AtkType.Physic){ popDamage = other.GetComponent<StatusC>().OnDamage(totalDamage , (int)element); }else{ popDamage = other.GetComponent<StatusC>().OnMagicDamage(totalDamage , (int)element); } if(shooter && shooter.GetComponent<ShowEnemyHealthC>()){ shooter.GetComponent<ShowEnemyHealthC>().GetHP(other.GetComponent<StatusC>().maxHealth , other.gameObject , other.name); } dmgPop.GetComponent<DamagePopupC>().damage = popDamage; if(hitEffect){ Instantiate(hitEffect, transform.position , transform.rotation); } if(flinch){ Vector3 dir = (other.transform.position - transform.position).normalized; //other.GetComponent<AIsetC>().Flinch(dir); other.SendMessage("Flinch" , dir , SendMessageOptions.DontRequireReceiver); } if(bombHitSetting.enable){ ExplosionDamage(); } //Drain HP if(drainHp > 0 && shooter && popDamage != "Miss" && popDamage != "Evaded" && popDamage != "Guard" && popDamage != "Invulnerable"){ int lf = int.Parse(popDamage) * drainHp; lf /= 100; if(lf < 1){ lf = 1; } Vector3 hpos = shooter.transform.position; hpos.y += 0.75f; Transform hpPop = Instantiate(Popup, hpos , transform.rotation) as Transform; hpPop.GetComponent<DamagePopupC>().damage = lf.ToString(); hpPop.GetComponent<DamagePopupC>().fontStyle.normal.textColor = Color.green; shooter.GetComponent<StatusC>().Heal(lf , 0); } //---------------------------- if(!penetrate){ Destroy (gameObject); } //When Enemy Shoot at Player }else if(shooterTag == "Enemy" && other.tag == "Player" || shooterTag == "Enemy" && other.tag == "Ally"){ if(AttackType == AtkType.Physic){ popDamage = other.GetComponent<StatusC>().OnDamage(totalDamage , (int)element); }else{ popDamage = other.GetComponent<StatusC>().OnMagicDamage(totalDamage , (int)element); } Transform dmgPop = Instantiate(Popup, transform.position , transform.rotation) as Transform; dmgPop.GetComponent<DamagePopupC>().damage = popDamage; dmgPop.GetComponent<DamagePopupC>().fontStyle.normal.textColor = Color.red; if(hitEffect){ Instantiate(hitEffect, transform.position , transform.rotation); } if(flinch){ Vector3 dir = (other.transform.position - transform.position).normalized; //other.GetComponent<AttackTriggerC>().Flinch(dir); other.SendMessage("Flinch" , dir , SendMessageOptions.DontRequireReceiver); } if(bombHitSetting.enable){ ExplosionDamage(); } //Drain HP if(drainHp > 0 && shooter && popDamage != "Miss" && popDamage != "Evaded" && popDamage != "Guard" && popDamage != "Invulnerable"){ int lf = int.Parse(popDamage) * drainHp; lf /= 100; if(lf < 1){ lf = 1; } Vector3 hpos = shooter.transform.position; hpos.y += 0.75f; Transform hpPop = Instantiate(Popup, hpos , transform.rotation) as Transform; hpPop.GetComponent<DamagePopupC>().damage = lf.ToString(); hpPop.GetComponent<DamagePopupC>().fontStyle.normal.textColor = Color.green; shooter.GetComponent<StatusC>().Heal(lf , 0); } //---------------------------- if(!penetrate){ Destroy (gameObject); } } } public void ExplosionDamage (){ Collider[] hitColliders= Physics.OverlapSphere(transform.position, bombHitSetting.bombRadius); if(bombHitSetting.bombEffect){ Instantiate(bombHitSetting.bombEffect , transform.position , transform.rotation); } for(int i= 0; i < hitColliders.Length; i++) { if(shooterTag == "Player" && hitColliders[i].tag == "Enemy"){ DealDamageOnly(hitColliders[i].transform , false); }else if(shooterTag == "Enemy" && hitColliders[i].tag == "Player" || shooterTag == "Enemy" && hitColliders[i].tag == "Ally"){ DealDamageOnly(hitColliders[i].transform , true); } } bombHitSetting.enable = false; } public void DealDamageOnly(Transform other , bool red){ if(AttackType == AtkType.Physic){ popDamage = other.GetComponent<StatusC>().OnDamage(totalDamage , (int)element); }else{ popDamage = other.GetComponent<StatusC>().OnMagicDamage(totalDamage , (int)element); } Transform dmgPop = Instantiate(Popup, other.position , other.rotation) as Transform; dmgPop.GetComponent<DamagePopupC>().damage = popDamage; if(red){ dmgPop.GetComponent<DamagePopupC>().fontStyle.normal.textColor = Color.red; } if(hitEffect){ Instantiate(hitEffect, other.position , other.rotation); } if(flinch){ Vector3 dir = (other.transform.position - transform.position).normalized; //other.GetComponent<AttackTriggerC>().Flinch(dir); other.SendMessage("Flinch" , dir , SendMessageOptions.DontRequireReceiver); } } } public enum AtkType { Physic = 0, Magic = 1, } public enum Elementala{ Normal = 0, Fire = 1, Ice = 2, Earth = 3, Lightning = 4, } [System.Serializable] public class BombHit{ public bool enable = false; public GameObject bombEffect; public float bombRadius = 20; }
  9. Ok and how can a gameobject disable a script after the gameobject is enabled? So the "disable script" is on the disabled gameobject and if I enable the gameobject via my UI button, will the "disable script" automatically activate.
  10. Hey, I have one last question. I have created a own script, that should disable a another script if I click on a UI button. But it don't work, what did I do wrong? Code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class DisableScriptwithUIButton : MonoBehaviour { public AttackTriggerC AttackScript; void Start() { AttackScript = GetComponent<AttackTriggerC>(); } public void DisableScript() { AttackScript.enabled = false; } }
  11. Thank you;)
  12. Ok, but can you tell me, what kind of function must I choose?
  13. Thanks, question: How can my UI button activate the "Spawn(transform.position);" call?
  14. Hey, thx for your answer. Do you know, how can I spawn a prefab on my player position by click on a UI button?
  15. Thanks for your helpful answer, it work. I have one another question, do you know, how can I disable a gameobject with a timer. So if I click on the UI button, is the selected gameobject disabled after 2 seconds?
×