Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UFPS : Ultimate FPS [ RELEASED ]

Discussion in 'Assets and Asset Store' started by VisionPunk, Mar 9, 2012.

Thread Status:
Not open for further replies.
  1. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I will thanks, its more about just being able to rotate the entire player controller on a button hit.
     
  2. vp_Tommy

    vp_Tommy

    Joined:
    Mar 1, 2015
    Posts:
    15
    @quarzwar Hi there, UFPS assumes that the gravity is always "down" so in theory you could mod it to work with a sphere gravity, and that would require heavy work. Definitely doable but not for the faint of heart.

    @BigB Are you using your own customized character? Does this occur with the provided prefab? If this is still an issue please kindly sent us a ticket so we could better support you.

    @Tinjaw this issued is currently being hotfix via the UFPS MP plugin, I believe the main dev will be looking into this and fixing this in the next update.
     
  3. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    198
    I have a question about the Melee. My question am I allow to add different melee weapons to the system and if so do they use rigidbody collisons with spring physics?
     
  4. vp_Tommy

    vp_Tommy

    Joined:
    Mar 1, 2015
    Posts:
    15
    @KingLlama Yes you can add your own custom melee weapons, and you could definitely use the spring physics for the melee. The melee system however is more of a prototype, a proof of concept of what the spring system in UFPS could do, so you will still require modding to better suit your game.
     
    KingLlama likes this.
  5. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I have bought this UFPS long time ago, but have been doing others things not related to this

    i think this is really awesome and very well done asset, and now I have changed one idea I had, and now I may be considering to use this UFPS if possible for what I want

    I know of course that this is for a game with a human or robot based player played in first person, but there seems to be an update that make this also possible to use a third person

    I have a flyinh hover car that has a turret weapon on the front that contains 10 different projectiles (is the same 3d model but the projectiles that come out from the weapon can be switched from 10 options available) and I want to use this for UFPS

    The point of view of the game os very close to the turret weapon, so it would be like much as a first person view, or a third person with the turret close to camera.

    Would it be possible that I could use this UFPS with a turret weapons instead of a human arm holding the weapon?

    How would I configure it that the same 3D model is able to switch between the 10 different projectiles?

    i have seen this tutorial

    Tutorial - UFPS plus Realistic Car Controller

    http://visionpunk.vanillaforums.com...ial-ufps-plus-realistic-car-controller#latest

    But do not know if this is the same as I want

    Thanks very much for any help and congratulations fro keeping updating this UFPS and making it even better
     
  6. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I just started a new project and imported UFPS 1.5.0. I noticed that the asset included project settings. I assume that was a mistake -- that they are not needed and were included by accident. Am I correct?
     
  7. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    UFPS use its own tags/layers which are included in project settings, so its normal, else you will have to configure the project yourself
     
  8. BrandenU

    BrandenU

    Joined:
    Aug 18, 2015
    Posts:
    2
    Hi, I just started using UFPS a few days ago. It's very useful so far, but I'm having trouble making a sword as a melee object. I want to be able to have the sword keep moving through enemies once it hits them but it recoils any time it impacts something. Is there a way to turn that off? It's getting in the way of the actual gameplay.
    Additionally, I can't seem to get it to damage anything outside of the cross-hairs. Is there a way to make the bullet larger?
     
  9. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Is there "Official" support for Playmaker or just community support? I'd like to know where to start.
     
  10. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hello and thank you for this awesome asset.
    Could someone help me, i'm trying to reduce run speed, while shift is pressed, but I only found how to adjust walking speed. is there something i didn't found?
     
  11. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Hi there, I'm trying to use UFPS with Emerald Animal Ai but every time I shot an animal I get an error message. According to Emerald Animal Ai devs I need to deactivate the UFPS hit/damage system, but how can I do that? There doesn't seem to be a specific script for this. Thanks
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,657
    The UFPS folks prefer to use the VisionPunk forum rather than this thread. You'll get quicker responses there. I'll also reply in the Emerald AI thread in a bit.
     
  13. jonfinlay

    jonfinlay

    Joined:
    Aug 25, 2015
    Posts:
    535
    Great Tony thanks! I've managed to find a 'quick fix' but any other feedback on this would be great.
     
  14. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    I am trying to use UFPS together with Emerald Animal AI to create a basic hunting game. It is the shooting and hitting of animals that isn't working consistently. Sometimes it works, most of the time it doesn't. If I put four animals in a scene I can almost always (but not absolutely) kill at least one animal. Sometimes more than one.

    I have very limited programming skills but I did spend time going through the both sets of code to try and figure this out myself, to no avail. Emerald says to use their Hit code, not yours. I understand what that means in theory, but in practice, I have no idea where to even start.

    I am using your Advanced Player and applying Emerald's "Player Weapon" script to your "Weapon Camera." Then I apply the Animal AI code to a cube (representing the animal), and apply a Nav Mesh to the terrain. That is pretty much it!
     
  15. vp_Tommy

    vp_Tommy

    Joined:
    Mar 1, 2015
    Posts:
    15
    Hi Guys, as @TonyLi mentioned, we usually frequent VisionPunk's forum, and you will get a response faster there. If all else fails and you need immediate support, feel free to send us a support ticket.
     
  16. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hello,what an amazing asset. I use it for a horror humoristic "game" that i don't plan to sell, it is just for me and my friends. But i'm trying to set the camera only in the third person view because I want to see my character (Alan Wake) and decrease speed when running but I can't find how to do that. Could you help me please?
     
  17. Deleted User

    Deleted User

    Guest

    Hi Vison Punk,

    I'm having this problem with UFPS I have multiplayer with it aswell, Is this some texture glitch or rendering glitch or something with UFPS?
    http://imgur.com/a/0tQym
     
  18. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    Hi itjoshk I experienced some bug with HE too it was quite differrent, only the gun moved and leave a "ghost mark" and I solved the problem changing the shader of al materials from he to other standard shader: standard, specular,... But not the HE shader and everything works fine now. Hope it will help you
     
  19. Deleted User

    Deleted User

    Guest

    Thanks, also UFPS I have a new problem.

    I'm currently not at my PC but I'll take some screenshots later, what is happening is that the guns don't show up and it glitches on the screen.
    Maybe someone had this problem.

    **UPDATE
    http://pastebin.com/rY0YrLSN
     
    Last edited by a moderator: Sep 17, 2015
  20. Deleted User

    Deleted User

    Guest

    I saw that it has the component but and its on, but when I start the game its disabled. So in mid-game I went in the players object, and turned vp_weapon and everything works. What is making this off?
     
  21. redjon29

    redjon29

    Joined:
    Jul 12, 2015
    Posts:
    92
    I really think that is a shader conflict problem. Try to turn to standard shader all of your materials even those for environnement and this should work fine.
     
  22. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    @redjon29 : You can force the camera to always be in 3rd person mode by creating a new script and doing this in its start method:
    Code (csharp):
    1.  
    2. void Start()
    3. {
    4.     vp_FPPlayerEventHandler player = GameObject.FindObjectOfType<vp_FPPlayerEventHandler>();
    5.     player.IsFirstPerson.Set(false);
    6. }
    7.  
    You may also want to comment out the feature to toggle 3rd person by keypress in vp_FPInput.cs -> InputCamera().

    @ItsJoshK : I replied to your support ticket.
     
  23. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
  24. VisionPunk

    VisionPunk

    Joined:
    Mar 9, 2012
    Posts:
    711
    UFPS 1.5.1 has been released. This is a small refactoring and bugfix release, mainly aimed at supporting the upcoming release of Paragon AI (which will soon supersede Shooter AI). It also fixes a number of known bugs.

    Releasenotes HERE.
     
    Last edited: Sep 30, 2015
    rushbier likes this.
  25. RoyalAllen

    RoyalAllen

    Joined:
    Oct 17, 2012
    Posts:
    205

    Just want to show off the cool things you can UFPS!
     
  26. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    VisionPunk friend as I do with the Sentio Characters changed since the damage method
    I can no longer take energy of character, do you know how to fix it
     
  27. sonnolo

    sonnolo

    Joined:
    Feb 22, 2015
    Posts:
    26
    Hello im in trouble for add hitmark and enemy bloodsplat when hit in ufps pls help?
     
  28. Muralidaran

    Muralidaran

    Joined:
    May 2, 2014
    Posts:
    93
    Hi guys, Mura again.
    So my game is coming along great. Hoping to have it up on Steam Greenlight by the end of the year. Right now though I need some help (being very much, Not a Coder).
    I am working on the inventory system and hot-bar setup. I am using Inventory Pro from the asset store. It is good but it doesn't allow you to let players drop and use weapons in the hot-bar to any number they want. So what I need is to know where in the UFPS weapon scripts does it tell the weapon which number key it is assigned to. So that way I can have the inventory system assign the numbers to each weapon based on where in the hot-bar they are assigned.

    Thanks,
    Mura
     
  29. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    The order of weapons is determined by how they are listed below the main camera. Notice how, in the demonstration scenes, the weapons are prefixed with a number as they are ordered as children of the camera. The weapon handler scripts use that prefix to sort the entries and prepare a list that is used throughout the system. Pressing #1 on the keyboard, for example, performs a trystart.setweapon(1) via the event handler. That first weapon is the first weapon found, in a sorted list that was gleaned as a child of the main camera from a method in the weapon handler script. You can prepare a list that does not involve children of the camera, but that would require some coding. You will either need to learn to code, while also gaining an understanding of the flow of UFPS, or change your process to work within the limitations of the standard UFPS scheme.
     
  30. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    Did it used to work properly? I believe that the newest version of UFPS includes a rewrite of the damage routines, to accommodate Paragon AI, but I might be wrong. Anyhow, compare the old damage handler scripts to the new ones, or check the change logs, and the release notes and perhaps you'll find what you need.
     
  31. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    What kind of trouble? How do you want your bloodsplat to perform? Typically, bullet holes appear on stationary objects, walls, crates, floors, etc., but not on enemies. Do you want bullet hole decals placed upon your enemies? nah.
     
  32. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I'm trying to make the shotgun reload one shell at a time. Is there a way to limit the reload amount to one or will I need to edit the scripts? If I need to edit, where is the best place to do this?

    Thanks!
     
  33. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    The shotgun uses the standard vp_FPWeaponReloader, so no, there isn't a way to tell it to add just one round at a time. The vp_FPWeaponReloader handles playing a specific animation after it calls upon vp_WeaponReloader to begin the reload activity. The actual reload occurs in the OnStop_Reload() routine in vp_WeaponReloader. As that routine sits right now, it fills up the current weapon to its maximum capacity via a message to the player event handler.

    I think the thing to do would be to create a separate script, designed to only reload shotguns. In that script one would probably want to cue up the animation and play it and play the reload sound inside of an OnStart.Reload(), checking of course to insure that the shotgun needed ammo, etc.. Then in an OnStop_Reload(), one would actually add the ammo to the current ammo count and then issue another call to the player event handler to TryStart another reload cycle if the weapon was not full. I don't know about the crossfading niceties that you might face in doing these things, but one would certainly want to check for other player activities throughout the process, and be prepared to abort the reloading if the player entered into an attack state, etc., etc. Good luck! Should be a fun thing to code and the community would love to benefit from your efforts, I'm sure! ;)
     
    drewradley likes this.
  34. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Thanks! I got it. Well, I got it to reload one shell when you hit reload. Need to hit reload more for more ammo. Maybe later I'll come back and set it up so it repeats until interrupted or full, but for now, one at a time is good enough.

    For my next trick, I'm going to set up a reloader that doesn't reload if you have any ammo left (for speed loaded revolvers). That should be pretty easy now that I know the way it all works.
     
  35. BrandSpankingNew

    BrandSpankingNew

    Joined:
    Nov 20, 2012
    Posts:
    220
    That would be a perfect place to use the event handler and do a CanStart_Reload() interception.
     
  36. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Did you ever make that script?
     
  37. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    You asking me? I edited the codes provided and would be happy to let you know what I did. It'll have to wait until Monday though. No time this weekend.
     
  38. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    No problem man, I can wait. :D
     
  39. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    I dug around in the code and it looks like I made a lot of little changes to many scripts and duplicated a couple.of scripts and made minor edits to those. It's more involved than I remember and I take terrible notes so I am not even sure of all the changes I made and to be perfectly honest I don't have the time to go back trough all of them to figure out what specifically I changed. I can give you the basics though. It's mostly duplicating the existing codes/lines and renaming.

    Duplicate both the WeaponReloader scripts and rename them to ShotgunReloaded in all the appropriate places (basically any place it says "WeaponReloader" I changed to "ShotgunReloader".

    In vp_PlayerEventHandler duplicate line 92 (RefillCurrentWeapon) and change it to RefillCurrentShotgun then call that OnStopReload in the the shotgun reloader you duplicated.

    Then in vp_PlayerInventory duplicate the OnAttempt_RefillCurrentWeapon and rename it OnAttempt_RefillCurrentShotgun then in the TryReload command change "CurrentWeaponIdentifier.ID" to "CurrentWeaponIdentifier.ID, 1". TryReload already has an override to let you specify the exact amount of ammo you want to add (it defaults to full reload if no amount is specified. This is the only real change you will make otherwise, all the code, functions, etc. are all the same with only the names changed.

    Not sure how helpful that will be but I am happy to answer specific questions. Go through the instructions/advice given to me by BrandSpankingNew and if you run into problems, look at how the reload currently works. Sorry I can't offer you any more help really. But I am busy and don't really have the time to write up more in depth instructions. But it's really pretty straight forward once you understand how reloading works.
     
  40. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Edit: Issues were caused by Unity breaking the asset upon import. Have since received support and solution. Was frustrated with the wrong people.
     
    Last edited: Nov 25, 2015
  41. salad__fingers

    salad__fingers

    Joined:
    Aug 11, 2012
    Posts:
    42
    It's not even on the asset store anymore.
     
  42. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,662
  43. Deleted User

    Deleted User

    Guest

    So, I'll have to re-buy the multiplayer? great.
     
  44. MarcusWatson

    MarcusWatson

    Joined:
    Dec 9, 2014
    Posts:
    53
    No - as far as I know, it's off the store for the moment then when it comes back on it becomes downloadable again for whoever had bought it. I've had that happen with assets before and it's only right he's done that.
     
  45. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    I have an issue where manually reloading a weapon before the current ammo count is 0 will switch to the next weapon. Where is this in the code base so I can fix it?

    Edit: Found it. Having AutoWield enabled switches to the next weapon during the first reload, so I disabled all AutoWield bools. This doesn't disable wielding a weapon on start, so it's all good.
     
    Last edited: Nov 24, 2015
  46. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    was wonder if anyone knows the best way to check if a weapon has been/is firing without changing the base ufps scripts.

    In my current script add-on i tried void Onstart_Fire() but that only seems to give an update when the fire button is pressed but not if the button is held down and repeatedly firing.
     
  47. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    Code (CSharp):
    1.  
    2. protected vp_FPPlayerEventHandler m_FPPlayer = null;
    3. public vp_FPPlayerEventHandler FPPlayer
    4. {
    5.   get
    6. {
    7.    if (m_FPPlayer == null) m_FPPlayer =    transform.root.GetComponentInChildren<vp_FPPlayerEventHandler>();
    8.        return m_FPPlayer;
    9.      }
    10.    }
    11.  
    12.    protected override void OnEnable()
    13.    {
    14.      if (FPPlayer != null) FPPlayer.Register(this);
    15.    }
    16.  
    17.    protected override void OnDisable()
    18.    {
    19.      if (FPPlayer != null) FPPlayer.Unregister(this);
    20.    }
    21.  
    22. if (m_FPPlayer.Attack.Active) //isAttacking
    23.  
     
    JBR-games likes this.
  48. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    @Goofy420 Thanks that got me going in the right direction. It still didn't give me a reference to when exactly the gun was firing. but was able to reference the vp_FPWeaponShooter and get the fire rate and do my own check fire rate which seemed to be nearly the same time.if anyone has a better way to go about this id love to hear it . For anyone that may want it...

    Code (CSharp):
    1. protected vp_FPWeaponShooter weaponShooter = null;
    2.     protected vp_FPPlayerEventHandler m_FPPlayer = null;
    3.     public float fireRate;
    4.     public float fireRateTimer;
    5.     public vp_FPPlayerEventHandler FPPlayer
    6.     {
    7.         get
    8.         {
    9.             if (m_FPPlayer == null) m_FPPlayer =    transform.root.GetComponentInChildren<vp_FPPlayerEventHandler>();
    10.             return m_FPPlayer;
    11.         }
    12.     }
    13.  
    14.     protected virtual void OnEnable()
    15.     {
    16.         if (FPPlayer != null) FPPlayer.Register(this);
    17.     }
    18.  
    19.     protected virtual void OnDisable()
    20.     {
    21.         if (FPPlayer != null) FPPlayer.Unregister(this);
    22.     }
    23.  
    24.  
    25.     // Use this for initialization
    26.     void Start () {
    27.         weaponShooter = this.gameObject.GetComponent<vp_FPWeaponShooter> ();
    28.         fireRate = weaponShooter.ProjectileFiringRate;
    29.     }
    30.  
    31.     // Update is called once per frame
    32.     void Update () {
    33.         if (m_FPPlayer.Attack.Active) {//isAttacking
    34.             if(fireRateTimer == 0){
    35.             Debug.Log("Firing");
    36.                 fireRateTimer = .0001f;
    37.             }
    38.         }
    39.         if (fireRateTimer > 0) {
    40.             fireRateTimer+= Time.deltaTime;
    41.             if(fireRateTimer>= fireRate){
    42.                 fireRateTimer = 0;
    43.             }
    44.         }
    45.     }
     
    Last edited: Nov 25, 2015
  49. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Yeah I must have forgot to edit this post. The issue was unity not the asset. Unity would botch the import. I did receive assistance once submitting a support ticket instead of forum post due to a bug on the fourms my question did not get the attention. It was an extremely frustrating experience however vp_Cal did provide assistance and a solution was found. It was a bad experience that I never encountered before but it was totally all unitys problem with importing.

    Publisher support is fantastic as long as you request it properly :)
     
    MarcusWatson likes this.
  50. Goofy420

    Goofy420

    Joined:
    Apr 27, 2013
    Posts:
    248
    Request for future update:
    Since UFPS v.1.5, muzzle flash prefabs would randomly spawn in editor mode. I never worried about it as I thought it was confined to editor mode. After using a live debugger that would allow debugging after being published, I noticed these muzzle flashes are being instantiated over and over again after switching a weapon. Sometimes there are dozens of them for each weapon as a child of the FPSCamera. I've also noticed others with a problem that switching weapons uses 90% of the system resources, and I believe the spamming of muzzle flashes to be the problem. As others have pointed out, if published to mobile, it works flawlessly for about 15 minutes, and then becomes unplayable. I believe the muzzle flash spamming to be the cause of this as well.
    This is a serious bug that should be addressed as soon as possible.

    Other than that, this is a great asset with the best coding techniques and structure I've ever seen and I hope to see more of the Multiplayer and AI addons in the near future.
     
    Last edited: Dec 19, 2015
    JBR-games likes this.
Thread Status:
Not open for further replies.