Search Unity

Realistic FPS Prefab [RELEASED]

Discussion in 'Assets and Asset Store' started by Deleted User, Apr 5, 2013.

  1. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Does anyone know of a simple way to give a weapon to the player? I am using the wave survival example to make something similar to cod zombies. I have the points and "mystery box" systems working but wall buying weapons has kinda stumped me. I see there is a function in PlayerWeapons that gives all weapons to everyone, and wanted to know if I could invoke something similar that gives specific weapons that I assign in the inspector.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    You need a reference to your PlayerWeapons component. Weapons are identified by their index number in PlayerWeapons' Weapon Order list. To give a weapon, such as weapon 3 (by default the shotgun):
    Code (csharp):
    1. var playerWeapons = FindObjectOfType<PlayerWeapons>();
    2. playerWeapons.weaponOrder[3].GetComponent<WeaponBehavior>().haveWeapon = true;
    To equip the weapon, run PlayerWeapons' SelectWeapon coroutine with the weapon index number:
    Code (csharp):
    1. StartCoroutine(playerWeapons.SelectWeapon(3));
     
    Last edited: Dec 7, 2019
    Bioman75 likes this.
  3. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Thanks but i'm getting this error
    error CS1061: Type `UnityEngine.GameObject' does not contain a definition for `haveWeapon' and no extension method `haveWeapon' of type `UnityEngine.GameObject' could be found. Are you missing an assembly reference?


    This is my wall buy script.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class WallBuy : MonoBehaviour {
    6.     private FPSPlayer FPSPlayerComponent;
    7.     private WeaponPickup weaponpick;
    8.     private Transform myTransform;
    9.     private int weaponToDrop;
    10.     [Tooltip("Amount of cash that it costs.")]
    11.     public float Price = 500.0f;
    12.     [HideInInspector]
    13.     public WeaponBehavior WeaponBehaviorComponent;
    14.     [HideInInspector]
    15.     public PlayerWeapons PlayerWeaponsComponent;
    16.     [HideInInspector]
    17.     public GameObject weaponObj;
    18.     public int weaponNumber = 0;
    19.     public string WeaponName = "";
    20.    
    21.     //Called on start
    22.     void Start () {
    23.         FPSPlayerComponent = Camera.main.transform.GetComponent<CameraControl>().playerObj.GetComponent<FPSPlayer>();
    24.         PlayerWeaponsComponent = FindObjectOfType<PlayerWeapons>();
    25.     }
    26.  
    27.     //Checks if player is in range of wall buy then prints message
    28.     void OnTriggerStay(Collider other) {
    29.         if (other.gameObject.tag == "Player")
    30.         {
    31.             if (Input.GetButtonDown ("Use")) {
    32.                 FPSPlayerComponent.RemoveCash (Price);
    33.                 PlayerWeaponsComponent.weaponOrder[6].haveWeapon = true;
    34.                 StartCoroutine(PlayerWeaponsComponent.SelectWeapon(6));
    35.                 //weaponpick.PickUpItem ();
    36.                 Debug.Log ("Bought " + WeaponName + "for " + Price);
    37.                 return;
    38.                     }
    39.         }
    40.     }
    41.        
    42. }
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    @Bioman75 - Sorry, typo. That line should be:
    Code (csharp):
    1. playerWeapons.weaponOrder[3].GetComponent<WeaponBehavior>().haveWeapon = true;
    I fixed it in my post above, too.
     
    Bioman75 likes this.
  5. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Thank you it works flawlessly now :)
     
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Glad I could help!
     
    SickaGames1 and Bioman75 like this.
  7. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    My max weapon count is 2 but when ever I buy a gun it increases, is it possible to get the currentweapon int in order to replace the currently held weapon?
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I'm not quite sure what you mean. If you want to limit the number of weapons the player has, you can set haveWeapon false for some of them. If you want to know what weapon the player currently has equipped, check the PlayerWeapons component's currentWeapon int.
     
  9. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    So the wall buy script I showed earlier checks the weapon number of the wall buy and gives you that weapon by setting HaveWeapon to True. The problem is that this disregards the max weapon count and just adds the guns to the players "inventory" instead of replacing them.
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    You need to check the weapon count yourself in that case. Call PlayerWeapon's UpdateTotalWeapons() method. Then check its totalWeapons variable. See the WeaponPickup script's PickUpItem() method for an example.
     
  11. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Works great kinda, thank you again for the support. ;) I'm not that familiar with rfps so sorry for the questions.
     
    Last edited: Dec 15, 2019
    TonyLi likes this.
  12. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    ... now you can re-texture weapons and player hands to something original, not just using the rfps default textures ... and same - for the sounds, as well ... Guys, we need to let know everyone that it does not make you any popularity for your project using original textures and sounds from RFPS, since the asset has such great potential it's plainly careless to do that way. Also, for the quality sake: at least apply the mid frequencies cut to the all game sounds before you put on you tube any game creations, (annoying sounds in the enhanced mid frequencies - it's the first place that gamers get to hate you, so as the rest of the community, noobs beware, we hope it helps to enhance the overall community standard, as well). It's Unity, it's what we do :). RDA-AlienMoon-Harold.JPG
     
    Last edited: Dec 14, 2019
  13. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @TonyLi you should just buy this asset and keep it up!
     
    petercoleman and OZAV like this.
  14. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    For some reason It wont give me an ammo refill when I go to buy the wall buy again after I deplete some rounds. When I check the console it prints the at max ammo message when i'm clearly not.

    Code (CSharp):
    1. //Checks if player is in range of wall buy, gives weapon, removes cash then prints message
    2.     void OnTriggerStay(Collider other) {
    3.         PlayerWeapons PlayerWeaponsComponent = Camera.main.transform.GetComponent<CameraControl>().weaponObj.GetComponent<PlayerWeapons>();
    4.         WeaponBehavior WeaponBehaviorComponent = weaponObj.GetComponent<WeaponBehavior>();
    5.         WeaponBehavior CurrentWeaponBehaviorComponent = PlayerWeaponsComponent.CurrentWeaponBehaviorComponent;
    6.         if (other.gameObject.tag == "Player")
    7.         {
    8.             if (Input.GetButtonDown ("Use")) {
    9.                 if (FPSPlayerComponent.cash >= Price) {
    10.                     if(!WeaponBehaviorComponent.haveWeapon){
    11.                         if(PlayerWeaponsComponent.totalWeapons == PlayerWeaponsComponent.maxWeapons && WeaponBehaviorComponent.addsToTotalWeaps){
    12.                             //determine if this weapon can be dropped (weapons like fists or a sidearm can be set to not be droppable)
    13.                             if (CurrentWeaponBehaviorComponent.droppable) {
    14.                                 //drop current weapon if dropCurrentWeapon is true
    15.                                 if (removeOnUse && !WeaponBehaviorComponent.dropWillDupe && !CurrentWeaponBehaviorComponent.dropWillDupe) {
    16.                                     PlayerWeaponsComponent.DropWeapon (PlayerWeaponsComponent.currentWeapon);  
    17.                                 } else {//replace current weapon if dropCurrentWeapon is false
    18.                                     CurrentWeaponBehaviorComponent.haveWeapon = false;
    19.                                     CurrentWeaponBehaviorComponent.dropWillDupe = false;
    20.                                     //prevent dropping this weapon and creating duplicated ammo by picking up the weapon again from the non-destroyable pickup item
    21.                                     WeaponBehaviorComponent.dropWillDupe = true;
    22.                                 }
    23.  
    24.                             } else {//currently held weapon is not dropable, so find next item in the weaponOrder array that is droppable, and drop it
    25.  
    26.                                 for (int i = PlayerWeaponsComponent.currentWeapon; i < PlayerWeaponsComponent.weaponOrder.Length; i++) {
    27.                                     if (PlayerWeaponsComponent.weaponOrder [i].GetComponent<WeaponBehavior> ().haveWeapon
    28.                                         && PlayerWeaponsComponent.weaponOrder [i].GetComponent<WeaponBehavior> ().droppable) {
    29.                                         weaponToDrop = i;//found the weapon to drop, break loop
    30.                                         break;
    31.                                         //no weapon found to drop counting up from current weapon number in weaponOrder array, so start at zero and count upwards
    32.                                     } else if (i == PlayerWeaponsComponent.weaponOrder.Length - 1) {
    33.                                         for (int n = 0; n < PlayerWeaponsComponent.weaponOrder.Length; n++) {
    34.                                             if (PlayerWeaponsComponent.weaponOrder [n].GetComponent<WeaponBehavior> ().haveWeapon
    35.                                                 && PlayerWeaponsComponent.weaponOrder [n].GetComponent<WeaponBehavior> ().droppable) {
    36.                                                 weaponToDrop = n;
    37.                                                 break;//found the weapon to drop, break loop
    38.                                             }
    39.                                         }
    40.                                     }
    41.                                 }
    42.  
    43.                                 if (removeOnUse && !WeaponBehaviorComponent.dropWillDupe) {//drop the next weapon if dropCurrentWeapon is true and current weapon is not droppable
    44.                                     PlayerWeaponsComponent.DropWeapon (weaponToDrop);  
    45.                                 } else {//replace the next weapon if dropCurrentWeapon is false and current weapon is not droppable
    46.                                     PlayerWeaponsComponent.weaponOrder [weaponToDrop].GetComponent<WeaponBehavior> ().haveWeapon = false;
    47.                                     PlayerWeaponsComponent.weaponOrder [weaponToDrop].GetComponent<WeaponBehavior> ().dropWillDupe = false;
    48.                                     //prevent dropping this weapon and creating duplicated ammo by picking up the weapon again from the non-destroyable pickup item
    49.                                     WeaponBehaviorComponent.dropWillDupe = true;
    50.                                 }
    51.                             }
    52.                         }
    53.                     }else{//the player already has this weapon, so give them ammo instead
    54.  
    55.                         if ((WeaponBehaviorComponent.ammo < WeaponBehaviorComponent.maxAmmo && removeOnUse)//player is not carrying max ammo for this weapon
    56.                             && WeaponBehaviorComponent.meleeSwingDelay == 0) {//player is not trying to pick up a melee weapon they already have
    57.  
    58.                             if(WeaponBehaviorComponent.ammo + WeaponBehaviorComponent.bulletsPerClip > WeaponBehaviorComponent.maxAmmo){
    59.                                 //just give player max ammo if they only are a few bullets away from having max ammo
    60.                                 WeaponBehaviorComponent.ammo = WeaponBehaviorComponent.maxAmmo;
    61.                                 Debug.Log ("Bought ammo for " + WeaponName + " for " + Price);
    62.                             }else{
    63.                                 //give player the bulletsPerClip amount if they already have this weapon
    64.                                 WeaponBehaviorComponent.ammo += WeaponBehaviorComponent.bulletsPerClip;
    65.                                 Debug.Log ("Bought ammo for " + WeaponName + " for " + Price);
    66.                             }
    67.  
    68.                             return;
    69.  
    70.                         }else{
    71.                             //if player has weapon and is at max ammo, just play beep sound
    72.                             //audioData.Play(0);
    73.                             Debug.Log ("At max ammo");
    74.                             return;
    75.                         }  
    76.                     }
    77.                     FPSPlayerComponent.RemoveCash (Price);
    78.                     asource.PlayOneShot(buyFx, 1.0f);
    79.                     PlayerWeaponsComponent.weaponOrder[weaponNumber].GetComponent<WeaponBehavior>().haveWeapon = true;
    80.                     StartCoroutine(PlayerWeaponsComponent.SelectWeapon(weaponNumber));
    81.                     PlayerWeaponsComponent.UpdateTotalWeapons();
    82.                     Debug.Log ("Bought " + WeaponName + " for " + Price);
    83.                     //return;
    84.  
    85.                 } else {
    86.                     //player cant afford wallbuy
    87.                     audioData.Play(0);      
    88.                     Debug.Log ("Doesnt have enough to buy " + WeaponName);
    89.                 }
    90.  
    91.             }
    92.         }
    93.     }
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    @Bioman75 - Each ammo-based weapon has two counts:
    • ammo: The number of bullets in the player's "inventory"
    • bulletsLeft: The number of bullets in the weapon's magazine
    The code above (from WeaponPickup) will only top up ammo. I recommend tracing through your code with a debugger so you can see where it's going and what the variable values are.
     
    Bioman75 and OZAV like this.
  16. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    For various reasons I would like to use my own player controller, but would like to keep the AI functionality of RFPSP. However I cannot figure out what I need to add to my player to get a Zombie or a Bad Soldier to chase him. Any tips on what I need as a minumum or how I might modify the AI.cs so that I don't need so much would be greatly appreciated
     
    Last edited: Dec 16, 2019
  17. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    33
    TonyLi likes this.
  18. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    33
    Ah, and also trailer

     
    OZAV likes this.
  19. amansweb

    amansweb

    Joined:
    Dec 20, 2017
    Posts:
    6
    Yes, Ill be changing the default models, textures and sounds in the next update.
     
    OZAV likes this.
  20. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    We are well, thanks Peter here at the aussie side, RFPS is a community value and from here - further to universities - it's a movement, same as we predicted back in the day it started and we all multiple-puchased it to support the Azuline, with the addition of the high quality forum members right here. ALL THE BEST FOR 2020 - TO ALL RFPS MOVEMENT MEMBERS AND FANS - AND TO ALL RFPS FORUM MEMBERS. HAPPY NEW 2020 YEAR - BY OZTRONIX STUDIOS.jpg
     
    F0GZ likes this.
  21. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299
    ... nice 2-pipe shot gun, how soon on the steam (the first sequel) ? :).
     
  22. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    33
    Its just second game :D
    3 of January is the release date
     
  23. F0GZ

    F0GZ

    Joined:
    Feb 22, 2018
    Posts:
    33
    OZAV, leandrovtd and TonyLi like this.
  24. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    Hello
    i need help about NPC tracer effects. I tried to change "Velocity over lifetime" setting in particle settings but it also affected TPS tracers too.
    NPCs always shot above player's head. When you check "Draw debug gizmo" on AI.cs you can see they directly aim at player's head and most of their shots looks like missing the player due to that.
    How do i change where NPC shoots? it seems like they always target top of the Player capsule collider but i am unable to find its place in the code.


    EDIT: Maybe this is a simpler solution; How do i make NPC tracer and TPS tracer seperate instead of using NPC tracer for both NPC and TPS mode?

    EDIT2: On WeaponEffects.cs i tried to add my own particle "tpsTracerParticles"(Also set an effect in inspector) and changed line 385's npcTracerParticles to tpsTracerParticles but it didn't work on my end..

    Line 50:
    Code (CSharp):
    1.  public ParticleSystem tpsTracerParticles;
    Line 382:
    Code (CSharp):
    1.  if(isPlayer && !WeaponBehaviorComponent.MouseLookComponent.thirdPerson){
    2.             tracerParticles = playerTracerParticles;
    3.         }else{
    4.             tracerParticles = tpsTracerParticles;
    5.         }
    I really need help about this. This is my second time asking help for this issue.
    Thanks.
     

    Attached Files:

    • help.png
      help.png
      File size:
      294.6 KB
      Views:
      406
    Last edited: Jan 15, 2020
  25. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    299

    Looks like you complicated for your self very nicely this far, so our first advice will be: that you (still) keep using same particle source for the FPS, and TPS view, so you will have to deal only with one setting and one particle source for tracers uses in the both views, and it will help you a lot for the start. So, for now - just check that in both cases they all draw from the same particle source, and you use, have (and edit) only one, for the both of views. Further - for every of these 2 separate views - (FPS and TPS) will be: to change (or add) the tracer origin object (transform location) or code edit tracer coordinates where it appears, on its origin object, to get it done. However we are strongly against creating another tracer system completely, and you are definitely in the wrong street from that reason only, at the moment, as it seems. Also: why declare: Else { when third else condition does not exist to be used, the #C can see everything in other scripts, under "public" and absolutely hates when we do stuff like that extra else, it doesn't know what to do with it if the third condition for it does not exist, so no need to use it there, really, just a tip extra, out of curiosity here. Don't Open - RFPS & Doors Package.JPG
     
    Last edited: Jan 20, 2020
  26. Takahama

    Takahama

    Joined:
    Feb 18, 2014
    Posts:
    169
    Code (CSharp):
    1.  
    2.         if(isPlayer && !WeaponBehaviorComponent.MouseLookComponent.thirdPerson){
    3.             tracerParticles = playerTracerParticles;
    4.         }else{
    5.             tracerParticles = npcTracerParticles;
    6.         }
    On code above, if i take npcTracerParticles from there and make "MouseLookComponent.thirdPerson" only use FPS tracers, it also turns NPC tracers into FPS tracers..
    When i search "BulletTracers", both WeaponEffects.cs and NPCattack.cs calls "BulletTracers" component and i have no idea how to change that.

    I just want to change the way NPC tracers travels(they just goes above player's head) without affecting TPS view's tracers.
    And since i am a noob at coding, a step by step guide will be most welcome.
    Thanks :(

    Update: Increasing eye height of the NPC to something like 2.3 makes tracer effects looks okay, but it changes eye height :/
     
    Last edited: Jan 20, 2020
  27. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    Hey sorry for the late delay. In the end, I let Unity just sit a bit and peculate and majically all the errors went away. I think Unity had some mid-state package installs like the oculus utils and maybe even the RFPS package that had to finish installing. All seemly working just fine now!
     
    TonyLi likes this.
  28. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    I am still around and still progressing my two projects. I update them to higher versions of Unity from time to time as I am going.

    Not been very well of late though so have been out of action a little while.

    My projects are also so large now that both computers I have are having difficulty managing them. The largest project I have weighs in at around 400,000 items in the project folder amounting to around 80gb of data.

    As the saying goes "I am going to need a bigger Boat"

    :)

    Hoping for some more progress in 2020.

    Peter
     
    OZAV likes this.
  29. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    I would recommend a cleanup package like Asset Hunter. Make a backup first!
     
  30. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Hi jaberwocky,

    Yes I have looked at and considered such assets. I do keep backups and backup reasoably frequently which I have to do. That in and of itself of course is a long job - some 3 hours each time as is the case if I Update Unity and have to reopen projects in a new version + the fact that there may be many other compatibilty issues to fix as a consequence to bring the project back into working order without the losss of any existing dev or assets....

    Truth be told at best my computers are now somewhat under powered to cope with the projects size and complexity and the newer Unity Versions. Of course I still have assets to update and potentially buy and add. The projects (games) are vast and complex and and undertaking not perhaps for a small single indie developer to even consider undertaking as the goal is set high. I am not one for accepting limitations which would mean the games do not meet with my personal expectations.

    As RFPS is limited in its game making I have a lot of other assets and plugins and so on integrated and need supporting too onging. e.g. UMA, Lyp Sinc Pro, Numerous AI systems to provide for more advanced NPC AI, Quadrupeds, Animals, Birds, Driveable Land vehicles, Flying Vehicles and NPC enemies, targeting systems and much more. Some of these things have to be managed by my own systems.

    UMA alone for example is a big asset and together with UMA clothing assets and so on comprise, many many thousands of files.

    I can be adding new assets almost every day. For example I recently added some new ones to help with building more levels. One assets was 4.7gb compressed zip. It alone added thousands of files - many of these as with many assets conatin content which I do not want but I do not know which I want until I build the levels and game. I may use them all I may not :)

    I have not yet anywhere like completed One Single level so deleting stuff is not a good idea unless its obviouly a duplicate or such like. A big problem is that many assets utilse very large PSD or Tiff files and so on and in most instances I dont need or want them thank you very much. !40mb for a single image out of perhaps 6 a single item material may contain - Thats half a gig of images on one item - you need a 2070 quantum computer to manage that on 400 thousand items which gets bigger every day :) Thus I convert as many such images to ther formats before deleting them if it is safe to do so which is not always the case but its all very time consuming and a drain on any system.

    Similarly Audio can be a problem. Many assets contain .wav files I dont need or want them so have to convert all.

    Anyway I have now gone and bought a new Larger SSD drive which I am hoping to install next week so hopefully that will solve my immediate problems - hopefully.

    :)

    Thanks all

    Peter
     
  31. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    Hey, guys! Is this asset deprechached and removed from the asset store?
    If yes - why? And how can I get\buy it now? I want it.
     
  32. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
  33. jaberwocky

    jaberwocky

    Joined:
    Nov 28, 2016
    Posts:
    106
    Yes I would only use the clean up when you go to make the actual builds. For me I was able to cut the size in half. I might even be able to do better if I were a little more aggressive with deleting stuff. That is why I make a backup so that I can go back to the other version when I am done with the build.
     
  34. adx7

    adx7

    Joined:
    Nov 15, 2016
    Posts:
    3
    Hello!
    How can I contact Azuline Studios?
    I did not have time to buy this asset from you: "RFPS" :(
    Can I buy RFPS from you now and use it for my project?
    Thanks!
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
  36. adx7

    adx7

    Joined:
    Nov 15, 2016
    Posts:
    3
    At the moment, he does not get in touch. I will wait yet.

    Thanks!
     
  37. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    @TonyLi So i recently bought the save system for rfps and none of it works for me. Im on 5.4.0 so I think it should work but I have errors on nearly every script or object.
     
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @TheChairMaster64 - Thanks for buying the Save System! What are some of the errors? What version of RFPS are you using?
     
  39. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @TonyLi Do you have any instructions for Integrating S-Inventory and RFPS?
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Hi @SickaGamer - If you're using the Dialogue System for Unity, you can follow these steps in the old version 1.x manual. You'll need a copy of the old integration packages. The examples may work in DS 2.x if you run the 1x to 2x Updater tool on them.
     
  41. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    It may be that rfps isn't up to date but i cant update it or it'll completely break my game and give errors.
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    @TheChairMaster64 - The Save System for RFPS should work with RFPS 1.2.x and above. If you're not using 1.4.x, remember to follow the instructions on page 5 of the manual. BTW, the next version will require Unity 2017.4+ to download from the Asset Store, although it may still work with Unity 5.x.
     
  43. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    Thanks that one line pretty much fixed all my errors. sorry that i didn't read that first. I have no idea how coding works or how they can effect the settings so this was interesting to learn.
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    Glad to help!
     
  45. TheChairMaster64

    TheChairMaster64

    Joined:
    Aug 9, 2016
    Posts:
    59
    So I have this script that faces whatever object it is set to (helps with projectiles in my game) but i want to have it always look at the main player of the game. At the moment i have to set manually every single time I put a new enemy prefab into the game but i want it hard locked on player so that it makes things easier:

    using UnityEngine;
    using System.Collections;
    public class LookAtPlayer : MonoBehaviour {
    public Transform myTarget;
    void Update()
    {
    transform.LookAt(new Vector3(myTarget.position.x, myTarget.position.y, myTarget.position.z));
    }
    }



    No im not a coder just a artist trying to figure some stuff out I just watched a tutorial on it. So nobody has to help me with this at all but it would be lovely as always thank you to all the programmers here.
     
  46. pagan_poetry

    pagan_poetry

    Joined:
    Feb 15, 2017
    Posts:
    107
    You can use tags (player has "Player" tag) and in this script in Start() function you can use FindWithTag to to make link to him.
     
  47. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    That would be good if very unlikely. Seen this before in the past with other engines where developers have abandoned them. They seem to be very reluctant to sell them on to potentially help their former loyal customers even if they have no intention of ever taking up the development again in future. I can perhaps understand that if I try hard enough :)
     
  48. petercoleman

    petercoleman

    Joined:
    Feb 21, 2016
    Posts:
    477
    Not sure if its relevant at all in this instance but it seems to me that the bullet tracers have some variation in their point of impact accuracy in relation to the player depending upon the accuracy setting (and others) of the player weapon and the attack range settings (Shoot distance) in relation to the distance of the player from the enemy. Of course at longer ranges the trajectory angle of the bullet and potentially the tracer is likely to be less accurate and perhaps way above or to the side of the player for example when accuracy is set to low as opposed to being 100% accurate.

    Bit like in real life where if I shoot at a barn door from just in from of it I could hardly miss, but at a great distance, if I am not a good shot or the weapon is inaccurate then yes I perhaps could not hit a barn door :)

    Peter
     
    OZAV likes this.
  49. Foodstamp

    Foodstamp

    Joined:
    Jun 11, 2013
    Posts:
    27
    I searched through this thread and I am trying to find the last version of Unity this is compatible with. Even better question is this, should I dust it off or just look for another system since it is no longer supported?
     
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    I think it may work with Unity 2018 without modification. It works with 2017. If you're comfortable with scripting, you can get it to work with 2019. Otherwise, version 2.2 of Opsive's character controllers are coming out in the near future with some nice features such as being able to drive vehicles.