Unity Community


Page 20 of 80 FirstFirst ... 1018192021223070 ... LastLast
Results 381 to 400 of 1599

  1. Posts
    437
    Quote Originally Posted by SLIMEBASS View Post
    Hey there. I bought your package for about a month ago but Im having some problems making a object damage.
    Example: When i shoot at an cube and the health is zero it destroy itself.

    I tried to take you PlayerDamage.js and convert it to singel player but i failed, Here is the code:
    Code:  
    1. //NSdesignGames @ 2012
    2. //FPS Kit | Version 2.0 + Multiplayer
    3.  
    4. //This script is used to controll player health
    5.  
    6. using UnityEngine;
    7. using System.Collections;
    8. using System.Collections.Generic;
    9.  
    10. public class ZombieDamage : Photon.MonoBehaviour {
    11.    
    12.     public GUISkin guiSKin;
    13.     //Player health
    14.     public float hp = 100;
    15.     public float currentHp;
    16.    
    17.     void Awake(){
    18.         currentHp = hp;
    19.     }
    20.        
    21.         currentHp -= damage;
    22.        
    23.         //We got killed
    24.         if(currentHp < 0){
    25.             currentHp = 0;
    26.         }
    27.     }

    Please i really need help with this one
    As I see all you did is removed random parts from PlayerDamage.cs and expected it to work?

    My suggestion is try to "Google" everything you dont know, for example "Unity 3D player damage"

    I were able to find this:

    Code:  
    1. using UnityEngine;
    2.  
    3. using System.Collections;
    4.  
    5. public class ZombieDamage :MonoBehaviour {
    6.  
    7. public float hitpoints = 100;
    8.  
    9. public void ApplyDamage (float damage) {
    10.      hitpoints -= damage;
    11.      if (hitpoints <= 0f) {
    12.           Destroy(gameObject);
    13.      }
    14. }
    15.  
    16. }
    Make sure script is called as ZombieDamage and attached to your Cube or other target you want to destroy


  2. Location
    Baku,Azerbaijan
    Posts
    74
    i dont have unity4!

    free9988771@gmail.com send my RoomMultiplayerMenu please!
    Last edited by BlackHunter; 01-26-2013 at 11:46 AM.


  3. Posts
    437
    Quote Originally Posted by BlackHunter View Post
    i dont have unity4!

    free9988771@gmail.com send my RoomMultiplayerMenu please!
    If you dont have Unity 4 how you were able to download FPS Kit 2.0? As I know, Asset Store do not allow to download packages which were made in higher version of Unity into older version.


  4. Location
    Baku,Azerbaijan
    Posts
    74

    ...

    Quote Originally Posted by NSdesignGames View Post
    If you dont have Unity 4 how you were able to download FPS Kit 2.0? As I know, Asset Store do not allow to download packages which were made in higher version of Unity into older version.
    I am using the old version. For unity35. I connected with dialup (50 kb/sec). unity4 and fpski i cant download
    Last edited by BlackHunter; 01-26-2013 at 12:09 PM.


  5. Posts
    437
    Quote Originally Posted by BlackHunter View Post
    I am using the old version. For unity35. I connected with dialup (50 kb/sec). unity4 and fpski i cant download
    If you use Unity 3.5 and older version of FPS Kit 2.0 you shouldn't have any problem with GUI.


  6. Location
    Baku,Azerbaijan
    Posts
    74
    Quote Originally Posted by NSdesignGames View Post
    If you use Unity 3.5 and older version of FPS Kit 2.0 you shouldn't have any problem with GUI.
    game-creators (dot) 16mb (dot)com/ play (dot) html


  7. Posts
    437
    Quote Originally Posted by BlackHunter View Post
    game-creators (dot) 16mb (dot)com/ play (dot) html
    Just checked it, GUI seems working fine. Good job btw, but a bit laggy though.


  8. Location
    Baku,Azerbaijan
    Posts
    74
    Quote Originally Posted by NSdesignGames View Post
    Just checked it, GUI seems working fine. Good job btw, but a bit laggy though.
    thanks, this is my first project . GUI buttons for spawn dont working in webplayer!


  9. Posts
    437
    Quote Originally Posted by BlackHunter View Post
    thanks, this is my first project . GUI buttons for spawn dont working in webplayer!
    But everything is worked fine for me, all buttons responded to mouse click and I were able to spawn


  10. Posts
    9
    Quote Originally Posted by NSdesignGames View Post
    As I see all you did is removed random parts from PlayerDamage.cs and expected it to work?

    My suggestion is try to "Google" everything you dont know, for example "Unity 3D player damage"

    I were able to find this:

    Code:  
    1. using UnityEngine;
    2.  
    3. using System.Collections;
    4.  
    5. public class ZombieDamage :MonoBehaviour {
    6.  
    7. public float hitpoints = 100;
    8.  
    9. public void ApplyDamage (float damage) {
    10.      hitpoints -= damage;
    11.      if (hitpoints <= 0f) {
    12.           Destroy(gameObject);
    13.      }
    14. }
    15.  
    16. }
    Make sure script is called as ZombieDamage and attached to your Cube or other target you want to destroy
    Its works but how?

    I did just like you said and i shot at the cube 15 times with the deagle, Nothing happened. Then i changed the hitpoint value to 1 and still same thing, But with the RPG it did work at one shot. So my question is where can i find the script where the "Damage" Value is applied?

    Cheers


  11. Posts
    9
    Quote Originally Posted by BlackHunter View Post
    GUI don't working on WEBPLAYER!!!!!

    and how add new maps ?? turtorial please!!!
    I have heard that many has the same problem with the GUI, Note that this is ONLY when they run Unity 4 and using the old package for 3.5. I dont see any reason to use the 3.5 package on Unity 4 if you already have bought the package? (If you have not bought it, Shame on you!)

    Otherwise you can just try updating the webplayer (Downloaded at www.unity3d.com)

    Cheers


  12. Posts
    5
    Hello please tell me how to add image effects on main camera ???


  13. Posts
    437
    Quote Originally Posted by anton1987ru View Post
    Hello please tell me how to add image effects on main camera ???
    Download Image effects package, than select MainCamera and go to Component -> Image effects and select any.
    Note: Image effects dont work in Unity free


  14. Posts
    437
    Quote Originally Posted by SLIMEBASS View Post
    Its works but how?

    I did just like you said and i shot at the cube 15 times with the deagle, Nothing happened. Then i changed the hitpoint value to 1 and still same thing, But with the RPG it did work at one shot. So my question is where can i find the script where the "Damage" Value is applied?

    Cheers
    Try to tweak bullet damage, set it to 50 for example and than test it.


  15. Posts
    5
    Quote Originally Posted by NSdesignGames View Post
    Download Image effects package, than select MainCamera and go to Component -> Image effects and select any.
    Note: Image effects dont work in Unity free

    thanks but you do not understand, I mean as in the scene bunker(multiplayer) to change the default value of the camera, for example i want change Far from 1000 то 5000, how i can change this value? . so that all player number automatically add effects to the camera.
    Last edited by anton1987ru; 01-28-2013 at 01:43 PM.


  16. Posts
    437
    Quote Originally Posted by anton1987ru View Post

    thanks but you do not understand, I mean as in the scene bin to change the default value of the camera. so that all player number automatically add effects to the camera.
    You need to drag player prefab into scene view, assign all values you need, than save it back to prefab so all players are spawned with new values.


  17. Posts
    5
    Quote Originally Posted by NSdesignGames View Post
    You need to drag player prefab into scene view, assign all values you need, than save it back to prefab so all players are spawned with new values.
    Thanks this works perfect!!


  18. Posts
    14
    Quote Originally Posted by SLIMEBASS View Post
    Its works but how?

    I did just like you said and i shot at the cube 15 times with the deagle, Nothing happened. Then i changed the hitpoint value to 1 and still same thing, But with the RPG it did work at one shot. So my question is where can i find the script where the "Damage" Value is applied?

    Cheers
    I also had this trouble, and after some searching around the files, I found it. Look for Bullet.js, that controls the bullet damage as far as I know. Scripts>Weapon System folder location to be exact.

    @NSdesignGames - I have a question about the bullet damage system you have in this kit. It seems like this bullet damage value of 20 is set for ALL guns in the game, including the sniper. So apparently all guns do 20 damage to a player. What I want to do is make it so that I can customize each gun to have different amounts of damage. For example, I want my UZI to do 30 damage, I want my AK47 to do 40, and my M16 to do 36. How would somebody be able to do that? I don't want all of my guns dealing 20 damage! Haha
    Last edited by wackyracer3; 01-29-2013 at 02:51 AM.


  19. Posts
    437
    Quote Originally Posted by wackyracer3 View Post
    I also had this trouble, and after some searching around the files, I found it. Look for Bullet.js, that controls the bullet damage as far as I know. Scripts>Weapon System folder location to be exact.

    @NSdesignGames - I have a question about the bullet damage system you have in this kit. It seems like this bullet damage value of 20 is set for ALL guns in the game, including the sniper. So apparently all guns do 20 damage to a player. What I want to do is make it so that I can customize each gun to have different amounts of damage. For example, I want my UZI to do 30 damage, I want my AK47 to do 40, and my M16 to do 36. How would somebody be able to do that? I don't want all of my guns dealing 20 damage! Haha
    Its easy, just clone bullet prefab and assign it to any weapon, than change damage value for that prefab you just assigned.
    Last edited by NSdesignGames; 01-29-2013 at 04:21 AM.


  20. Posts
    437
    Quote Originally Posted by SLIMEBASS View Post
    *facepalm* seriously, how you even got an that idea to just parent bullet prefab to soldier?

    Select Deagle game object (or any other weapon) -> In the WeaponScript assign Bullet variable with new prefab.

Page 20 of 80 FirstFirst ... 1018192021223070 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •