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

Community Reputation

1 Neutral

About iGamerTrip

  • Rank
  • Birthday 04/19/1866

Profile Information

  • Gender
  • Location:
    Saudi Arabia
  1. Simple Pathfinding Zombie Ai

    here's my Health Script (it's the Health script for AU FPS Kit) : #pragma strict // FPS KIT [www.armedunity.com] var hitPoints : float; var maxHitPoints : int; var regeneration : boolean = false; var regenerationSpeed : float; var aSource : AudioSource; var painSound : AudioClip; var fallDamageSound : AudioClip; var deadReplacement : Transform; var mySkin : GUISkin; private var radar : GameObject; var damageTexture : Texture; private var t : float = 0.0; private var alpha : float; private var isDead : boolean = false; private var scoreManager : ScoreManager; var camShake : Transform; function Start(){ if(regeneration) hitPoints = maxHitPoints; alpha = 0.0; } function Update(){ if (t > 0.0){ t -= Time.deltaTime; alpha = t; } if(regeneration){ if( hitPoints < maxHitPoints) hitPoints += Time.deltaTime * regenerationSpeed; } } function PlayerDamage (damage : int) { if (hitPoints < 0.0) return; hitPoints -= damage; aSource.PlayOneShot(painSound, 1.0); t = 2.0; if (hitPoints <= 0.0) Die(); } //Picking up MedicKit function Medic (medic : int){ hitPoints += medic; if( hitPoints > maxHitPoints){ var convertToScore : float = hitPoints - maxHitPoints; scoreManager = gameObject.Find("ScoreManager").GetComponent(ScoreManager); scoreManager.addScore(convertToScore); hitPoints = maxHitPoints; } } function Die () { if(isDead) return; isDead = true; if(scoreManager == null) scoreManager = gameObject.Find("ScoreManager").GetComponent(ScoreManager); scoreManager.PlayerDead(); Instantiate(deadReplacement, transform.position, transform.rotation); Destroy(gameObject); } function OnGUI () { GUI.skin = mySkin; GUI.Label (Rect(40, Screen.height - 50,60,60)," Health: "); GUI.Label (Rect(100, Screen.height - 50,60,60),"" +hitPoints.ToString("F0"), mySkin.customStyles[0]); GUI.color.a = alpha; GUI.DrawTexture(new Rect(0,0,Screen.width, Screen.height), damageTexture); } function PlayerFallDamage(dam : float){ PlayerDamage(dam); if(fallDamageSound) aSource.PlayOneShot(fallDamageSound, 1.0); } function Shake(p : float) { var t : float = 1.0; var shakePower : float; while (t > 0.0) { t -= Time.deltaTime; shakePower = t/50; camShake.rotation.x += Random.Range(-shakePower, shakePower); camShake.rotation.y += Random.Range(-shakePower, shakePower); camShake.rotation.z += Random.Range(-shakePower, shakePower); yield; } } i read it and didn't find any reference for PlayerHealth or Health so i thought it's handled by the ScoreManger Because its Referenced in the script a lot, but i read the Scoremanger script and i didn't find any Health References Except death and other stuff, but if you need the ScoreManger script to Check it Here it is: #pragma strict // FPS KIT [www.armedunity.com] var currentScore : int = 0; var hitCrosshairTexture : Texture; private var alphaHit : float; var hitSound : AudioClip; var mySkin : GUISkin; var pointsToNextRank : int = 50; var lvl : int = 0; var levelUpSound : AudioClip; private var playerDead : boolean = false; var aSource : AudioSource; function Update () { if (alphaHit > 0) alphaHit -= Time.deltaTime; } function DrawCrosshair(){ yield WaitForSeconds(0.05); alphaHit = 1.0; aSource.PlayOneShot(hitSound, 0.2); } function addScore(val : int){ currentScore += val; if(currentScore >= pointsToNextRank){ lvl++; aSource.PlayOneShot(levelUpSound, 0.2); pointsToNextRank += currentScore; } } function PlayerDead(){ playerDead = true; } function OnGUI(){ if(playerDead) return; GUI.skin = mySkin; GUI.depth = 2; GUI.Label (Rect(40, Screen.height - 80,100,60)," SCORE :"); GUI.Label (Rect(100, Screen.height - 80,160,60),"" + currentScore, mySkin.customStyles[0]); GUI.Label (Rect(40, Screen.height - 110,100,60)," LVL :"); GUI.Label (Rect(100, Screen.height - 110,160,60),"" + lvl, mySkin.customStyles[0]); GUI.color = Color(1.0, 1.0, 1.0, alphaHit); GUI.DrawTexture (Rect ((Screen.width /2) - 16, (Screen.height/2) - 16, 32, 32), hitCrosshairTexture); } i hope you understand but if you still can't help me i can remove that line of script and apply a script for damage over time near the zombie and thanks.
  2. Simple Pathfinding Zombie Ai

    still not fixed :\ here's the new error: error CS0246: The type or namespace name `PlayerHealthScript' could not be found. Are you missing an assembly reference?
  3. Sentry Script

    how can i use the AU FPS Kit 1.5 shooting script for this what do i add? (i am new to scripting)
  4. Simple Pathfinding Zombie Ai

    i am using the AU FPS Kit 1.5 and i have no other stuff other than textures and i don't know about scripting a lot.
  5. Simple Pathfinding Zombie Ai

    hello i need someone to help me i cant run the script for tests theres an error heres the error: error CS1061: Type `PlayerHealth' does not contain a definition for `TakeDamage' and no extension method `TakeDamage' of type `PlayerHealth' could be found. Are you missing an assembly reference? please help.
  6. i need a FPS World

  7. i need a FPS World

    ok Thanks, i will move it as fast as possible
  8. i need a FPS World

    Hi,i Guess Most Of You Know What i Want Based On The Title (i need a FPS World) i want it to have cover and buildings it's ok if it's small and i will list the creator on the credits (if he/she wants) and thanks!
  9. [Paid] Weapons for a multiplayer fps kit

    no problem
  10. [Paid] Weapons for a multiplayer fps kit

    That asset will help you upload your stuff: https://www.assetstore.unity3d.com/en/#!/content/115
  11. [Paid] Weapons for a multiplayer fps kit

    ok i can get you free guns that's not animated if you want or you can ask the devs mabe they are nice i will email them i want to make a FPS Kit too
  12. [Paid] Weapons for a multiplayer fps kit

    they are animated already just ask the devs of the assets and put the sites for the assets in the discription if they say no i think i have more gun models
  13. [Paid] Weapons for a multiplayer fps kit

    There is 2 assets you will need both are free 1-https://www.assetstore.unity3d.com/en/#!/content/53729 it is 4 guns 1 assault rifle and 1 Submachine gun and 1 shotgun and 1 rocket launcher and it's all animated but can't shoot and here comes the second asset: 2-https://www.assetstore.unity3d.com/en/#!/content/33070 it can make any gun (or anything) shoot and eject shells it comes with everything exept guns so you get the gun from above then you make it shoot using that asset i don't own any asset from those i'm just helping other devs, but i need some help i'm making a zombie game and i like some game assets like a dystroyed worldif you know a free good dystroyed world tell me i need one.