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

animated fps weapons

Discussion in 'Assets and Asset Store' started by Mister-D, May 28, 2015.

  1. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    i think i know how to make money on mobile games.the people i know that are addicted to games, even the most simple and stupid ones are the ones that are "free" to play and give some kind of reward during the game. the thing is, if u want a better reward u have to pay some money, almost every player does this. just my 2 cents ;)

    heres a wip of the shield for the update
    shieldWIP.png
     
    OZAV, llJIMBOBll and QuadMan like this.
  2. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Fun, a Shield
     
    Mister-D likes this.
  3. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Just my 2 cents, i love the shield but i think you should do the glass part bigger because it seems dificult to see with the shield equiped.

    Take a look at other games shields.







     
  4. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    its actually an existing shield i used as reference. and i like it.
    the shield will only be in front of the player like in the screenshot when right mouse is pressed to block incoming fire. the neutral state is with the shield aside a bit and the pistol aiming so u can see more.


    ill also add a bow and arrow as i mentioned before
     
    Last edited: May 28, 2016
    llJIMBOBll and 99thmonkey like this.
  5. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    i found a bug and dont know how to fix it. everytime u switch weapon the game freezes for a second or so, does anyone know how to solve this?
     
  6. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Is this happening to you with the current release?
     
  7. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes

    heres a wip of the bow and arrow
    bow.jpg
     
    llJIMBOBll and hopeful like this.
  8. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    Yes I had the same problem start the game with all weapons activated then do a loop and deactivate all weapons. I think your script might already have the loop but i don't think all the weapons were set to enabled.
    Also when getting references to components that you are going to use every frame or a lot put the GetComponent<>(); line of code in the Awake not in the Start or Update

    So in the weaponselector script in the start function then select the first one

    Code (CSharp):
    1. //Desactive all weapons
    2.        
    3. for(inti=0;i<Weapons.Length;i++){
    4. Weapons[i].gameObject.SetActive(false);
    5. }
    6. Weapons[currentWeapon].gameObject.SetActive(false);
    7.  
     
  9. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    tnx for your tip, will try it. i know my code is a not so good but i do my best to improve
     
  10. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    I have a new download link of the game on my page. Buckeye Studios Link

    I used MFP, MFPS, FPS Weapons and a good amount of custom scripts.Please let me know if you find any errors, as I wanna have a good base before moving forward.

    Right now only the pistol is synced soon more will be and I have some AI I will be adding soon also.
     
  11. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    NP, if there is anything else you need help with let me know. Unity forums and Youtube are the 2 ways I learned how to use Unity.
    Also I sent you a PM
     
  12. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    will try it this week and let u know what i think
    again tnx
     
  13. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Such AMazBallz :D Cannot Wait :D

    Hi I'm just wondering to anyone or Mister D, if you know the names of some of the guns or as close to which I can use. Thanx :D
     
    Mister-D likes this.
  14. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Sorry, but I don't use your scripts only the models and animations. But it's probably like the other person said with the Awake vs Start and such. I use UFPS for all the weapons, and starting to use Opsive's Third Person Controller. Your models are great!
     
    Mister-D likes this.
  15. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    ill look up the names of the ones that do exist
     
    llJIMBOBll likes this.
  16. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    here are the names

    p226
    jackhammer
    fn mag
    desert eagle .50
    glock 17
    kriss vector
    DT SRS
    magpul pdr
    czw 127
    striker shotgun
    B&T p26
     
    llJIMBOBll likes this.
  17. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Perfect! Thanx alot man! :D
     
  18. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
  19. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes could be, but i was not sure what shotgun i used as reference so i did not list it
    just finished the bow
    bowunity.jpg
    give me another week to finish the update
     
    SuperNewbee, hopeful and llJIMBOBll like this.
  20. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    sorry for the delay my fellow developers
    i present u update 2.9 of fps weapons
    i hope its live by the end of this week
     
    99thmonkey, b4c5p4c3 and llJIMBOBll like this.
  21. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Great job as usual
     
    Mister-D likes this.
  22. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    the update is live
     
    llJIMBOBll likes this.
  23. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    Downloading :D Thank You Sir :D
     
    Mister-D likes this.
  24. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    Downloaded and tested i've to say the additions are awesome. The best asset in the entire store hands down.
     
    llJIMBOBll likes this.
  25. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    haha tnx, i have been working on this for more than a year now and its beginning to show of. have fun with it
     
    MikeCoderMore, llJIMBOBll and OZAV like this.
  26. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    297
    ...a (circle) Ping Menu ? (as in FarCry4), so - we can select a weapon we want
    calling that pie-Ping menu, by holding a button,
    and moving right stick and release, over weapon we want to select
    (a little player Inventory work, like that... see - switching 230 times,
    to the weapon you want to select is a bit annoying, at the moment...)...
    Can anyone code this for BumStrum, and post here, for us, as well,
    , if someone has done this before, please, with PieMenu asset, or so,
    ? So it has gamepad support and keyboard-mouse support ? I can help
    with adding of code for game pad - so - drop me a line here, guys...
    (or BumStrum can talk to guys from PieMenu asset, to do it for the package)
     
  27. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    hi @A0101A i tried the best i can to make the demoscene scripts but have no idea on how to make that wheel switch script, if anyone can and wants to improve the weaponselector script i would be very happy if u share it.
     
  28. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    only one word TOP
     
  29. OZAV

    OZAV

    Joined:
    Aug 9, 2013
    Posts:
    297

    Yes, ok, please, just talk to guys of the PieMenu asset, they can make for you a simple script and prefab that will do that, for the package. Ask them to make shortest possible version for you: just a Ping Menu :)
    Here, contact them:
    https://www.assetstore.unity3d.com/en/#!/content/35283
    ***BTW, your code is not bad, be more confident in yourself :)
     
    Last edited: Jun 3, 2016
  30. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    177
    I bought the asset this morning, and I love it, but I can't figure out how to limit the number of weapons the player can carry - scrolling thru 30 weapons becomes a pain, but when I try deleting some of the 30 weapons listed in the weapon selector script, when I restart the scene, all the remaining weapons are displayed at once.
    Also, I have no idea how to use the "have weapons" option in the same script - I can enter a number, and then that number of checkboxes opens up - what am I supposed to do with them?
    Any assistance appreciated, thanks, and kudos on a terrific asset, without doubt the best fps arms and weapons in the store.
    Cheers.

    P.S. Using Unity personal 5.3.4f1
     
  31. SuperNewbee

    SuperNewbee

    Joined:
    Jun 2, 2012
    Posts:
    195
    I just tested this. I am not sure if this is the right way to do it but it seems to work

    Disable all the weapons first by selecting them all (arms@knife,arms@flashlight etc) and then removing the top left checkmark in the inspector (they will change from blue to light blue)

    Then go to weaponselector in the inspector

    change:

    current weapon 0
    change weapon size to 3

    drag whatever weapons you want into element 0 1 and 2

    hit play and u should have 3 weapons now


    Hopefully this helps. Dev may have a better way of doing this
     
    Mister-D likes this.
  32. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    177
    Thanks for that, I tried your suggestion and it works :)

    Cheers.
     
    Last edited: Jun 7, 2016
  33. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    try leaving all weapons active and change max weapon number in selector script inspector to the number u want
    then:
    mark out the lines after "for test only"
    Code (CSharp):
    1. //for test ONLY, to enabled all weapons
    2.  
    3.         //for (int i=0;i<Weapons.Length;i++){
    4.             //HaveWeapons[i]=true;
    let me know if this fixed it
     
  34. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    177
    Nope, it did nothing at all when I removed those lines from the script, all the weapons still show up at the same time. When you say change max weapon number, where is that exactly - you have 'current weapon', 'weapons' and 'have weapons' in the inspector - which one is relevant to what I'm trying to do, and to what you're saying? Thanks.

    Edit: I had to reactivate those lines of code, because with them out of the script, the fix listed above that was working, stopped working; I would start with the first weapon I listed, but I couldn't get the other 2 weapons to show up when I scrolled the mouse wheel.
     
    Last edited: Jun 7, 2016
  35. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    If you want to active the weapon number 0,4,5 , you have to write this :

    for (int i=0;i<Weapons.Length;i++){
    if(i==0 || i==4 || i==5)
    HaveWeapons=true;
    }
     
    Mister-D likes this.
  36. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    177
    Ok, thanks for that, I'll give it a shot.
     
  37. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    hello all
    i making updates for all my paid assets this summer
    im planning on updating fps weapons to 3.0 and then ill consider this one finished ;)
    so i will add one more weapon to the package and fix some small bugs in the scripts ive encountered
    please post your suggestions for the new weapon here...
    the most popular one will be added.
    cheers
     
    llJIMBOBll likes this.
  38. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    89
    maybe C-4 with detonator; or a flare gun
     
    Mister-D likes this.
  39. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Interchangable sights that fit most weapons
     
    Mister-D likes this.
  40. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    + 7

    maybe claymore?

    Ah also, maybe bare hands and arms?

    Thanx :D
     
    Mister-D likes this.
  41. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    a remote explosive is a good idea

    ive allready tried to switch the arms but didnt get good results
     
  42. jayimagination

    jayimagination

    Joined:
    Dec 20, 2012
    Posts:
    89
    Ah, was playing GTA 5 and a stun gun would be nice also!
     
    Mister-D likes this.
  43. JC_LEON

    JC_LEON

    Joined:
    May 20, 2014
    Posts:
    518
    i really want to buy this asset but price is too high for me and even for most indie developers i think..
    did you ever thinked for a price drop???
     
  44. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes i thought about it ;)
     
  45. JC_LEON

    JC_LEON

    Joined:
    May 20, 2014
    Posts:
    518
    so??
     
  46. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im thinking to lower to 90$
    i cant go lower, sorry
     
  47. JC_LEON

    JC_LEON

    Joined:
    May 20, 2014
    Posts:
    518
    70 would be great but 90 is better than 120 lol

    wait for price drop to buy it..
     
    Justice0Juic3 likes this.
  48. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    almost done with version3.0
    -2 new weapons(remote bomb, and "the blaster")
    -improved scripts
    -i ll also include some extra arm and player skins
    newadditions.jpg
     
  49. b4c5p4c3

    b4c5p4c3

    Joined:
    Jan 4, 2013
    Posts:
    537
    This is no doubt the best asset in the entire store. I'm eager to see what will be your next creation.
     
    Mister-D likes this.
  50. QuadMan

    QuadMan

    Joined:
    Apr 9, 2014
    Posts:
    122
    Wow love the C4
    Time to trolllll ouuuuuuuuut
     
    Mister-D likes this.