Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

How can I have unlimited ammo ? (Mapping) - A Forum Thread for Counter-Strike: Global Offensive.

I have been investigating an entire afternoon and I can't find out how to set unlimited ammo for weapon_entities

Hi all =). I'm the creator of all training_aim maps and I really want to recompile training_aim3 for CS:GO. I have corrected almost all the "bugs" caused by the engine update but I have a big problem with the unlimited ammo. In CS:S I used a lotic_timer that toggled a trigger_multiple every 0.01 seconds that was parented to the player. Then the trigger_multiple "use" a game_player_equip with this keyvalue: ammo_50ae - 1. The result was unlimited ammo in every weapon because every 0.01 seconds your ammo was restored. In CS:GO this method seems to crash the game. I have investigated an entire afternoon but I can't find out the way :S. The only solution right now is to use a point_servercommand with sv_cheats 1 and sv_infinite_ammo 1. Since it is an offline map it shouldn't be any problem but I would preffer to find other method rather than using sv_cheats 1. Thanks in advance =)
  • iNick avatar
    iNick Joined 10y ago
    Offline
    133 points Ranked 96,449th
    10y
    Maybe wait the release of the game ?
    Heavy's Sandvich
    URL to post:
  • katas avatar
    katas Joined 13y ago
    Offline
    1,709 points Ranked 24,254th
    8 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    10y
    I don't think that will work but it's an option xP
    katapulta^
    URL to post:
  • Devieus avatar
    Devieus username pic Joined 12y ago
    ◑w◐ Super Moderator
    ONLINE
    119,236 points Ranked 27th
    80 medals 8 legendary 18 rare
    • 1st Place - Tutorial Contest Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • 2017 Top Contributor Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    Devieus avatar
    Devieus
    ◑w◐
    10y
    Do you have any clue what the underlying problem might be? Is it the parenting of the trigger, or maybe the 'game\_player\_equip'?
    Sentinel of the TV remote avatar
    Mantra
    Sentinel of the TV remote
    URL to post:
  • katas avatar
    katas Joined 13y ago
    Offline
    1,709 points Ranked 24,254th
    8 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    10y
    Oh sry, I should have posted that too. After investigating a bit I discovered that the problem comes from the game_player_equip. I tried different ways for launching the using output (with unparented triggers and buttons) but everytime I launch the output the game crashes :S. But the real problem is the ammo_50ae since the game_player_equip works perfectly with weapon_. I tried with other "ammo" entities like: ammo_338mag ammo_357sig ammo_45acp ammo_556mm ammo_556mm_box ammo_57mm ammo_762mm ammo_9mm ammo_buckshot In CS:S worked perfectly but Valve seems to have disabled this. So I was basically asking for a completely different method since game_player_equip is likely useless for that purpose :(
    katapulta^
    URL to post:
  • Burnfingers avatar
    Burnfingers username pic Joined 15y ago
    Offline
    131,657 points Ranked 20th
    29 medals 1 legendary 6 rare
    • 10 years a member Medal icon
    • Reached 75,000 Points Medal icon
    • 6 years a member Medal icon
    • Submitted 20 Gamefiles Medal icon
    • Submitted 15 Mods Medal icon
    • Submitted 20 Mods Medal icon
    10y
    the way i've always had to do it is with spawned weapons... use the entity tool to drop a weapon somewhere, select it and alt-enter or doubleclick it, turn off smartedit, type 'ammo' as the key and a number (9999999999?) as the value, then hit the add button. hammer will hate you lol, but the game understands what it means. how you would change it on all weapons not just spawned ones i dont know, but this might be useful if you cant figure it out.
    aka [-B-] avatar
    Mantra
    aka [-B-]
    URL to post:
  • .Krusty avatar
    .Krusty Joined 14y ago
    Offline
    10,551 points Ranked 838th
    11 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • Reached 7,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    10y
    > **Posted by Burnfingers** > the way i've always had to do it is with spawned weapons... use the entity tool to drop a weapon somewhere, select it and alt-enter or doubleclick it, turn off smartedit, type 'ammo' as the key and a number (9999999999?) as the value, then hit the add button. hammer will hate you lol, but the game understands what it means. how you would change it on all weapons not just spawned ones i dont know, but this might be useful if you cant figure it out. this would give 9999 ammo but you would need to reload. i dont think this is what OP wanted. (to answer your question: you can go to entity-report and select all weapon__* and edit them at once)
    HQ is HQ
    URL to post:
  • K@rt avatar
    [email protected] Joined 13y ago
    Offline
    11,802 points Ranked 729th
    17 medals 1 rare
    • 6 years a member Medal icon
    • Mapper of the Month, July 2012 Medal icon
    • Reached 1,000 Points Medal icon
    • Reached 2,500 Points Medal icon
    • Reached 7,500 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    10y
    To make unlimted ammo in Source I did this: use a game _player _equip, and with smart edit turned off add the type of ammo you want as the key, and put 2 as its value. Add the weapon you want to have unlimited ammo and name it. Add a trigger multiple with the weapon entity as the parent (so the trigger multiple follows the weapon around). With the reset delay set to 0 on the trigger add an output: on trigger -> game _player _equip -> use -> delay "0" Finally add a logic _timer with a refire of 0.001 and an output on timer -> trigger -> toggle (In CS:S you need to add a logic _auto with an "on map spawn" output to set the trigger _multiples parent as the weapon entity because the parenting sometimes bugs out) This sounds like what you explained, but I just wanted to make sure. Like I said the parenting could bug out in source. Is it the ammo definitions like katas mentioned? Have you tested the game _player _equip by itself to see if it causes problems? In the source version of this it never recognised the use command, even though it worked. I wonder if it comes from that? Actually did you try simply sending an "add output" command directly to the weapon? It never worked in source although logically I can't see why, you can add the ammo output directly into the weapon entity with no problems
    Messiah
    URL to post:
  • katas avatar
    katas Joined 13y ago
    Offline
    1,709 points Ranked 24,254th
    8 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    • 1 year a member Medal icon
    • 2 years a member Medal icon
    10y
    > **Posted by [email protected]** > To make unlimted ammo in Source I did this: > > use a game _player _equip, and with smart edit turned off add the type of ammo you want as the key, and put 2 as its value. > > Add the weapon you want to have unlimited ammo and name it. Add a trigger multiple with the weapon entity as the parent (so the trigger multiple follows the weapon around). With the reset delay set to 0 on the trigger add an output: > > on trigger -> game _player _equip -> use -> delay "0" > > Finally add a logic _timer with a refire of 0.001 and an output > > on timer -> trigger -> toggle > > (In CS:S you need to add a logic _auto with an "on map spawn" output to set the trigger _multiples parent as the weapon entity because the parenting sometimes bugs out) > > This sounds like what you explained, but I just wanted to make sure. Like I said the parenting could bug out in source. > > Is it the ammo definitions like katas mentioned? > > Have you tested the game _player _equip by itself to see if it causes problems? > > In the source version of this it never recognised the use command, even though it worked. I wonder if it comes from that? > > Actually did you try simply sending an "add output" command directly to the weapon? It never worked in source although logically I can't see why, you can add the ammo output directly into the weapon entity with no problems Yes, it is almost the same method that I used. The use commands is not recognised by the new engine too but it works since I used the game_player_equip to spawn normal weapons with buttons (OnPressed-use). I tried adding an output directly into the weapon but it doesn't work. And yes, the problem comes from the game_player_equip as I explained in my last post :S. Any other ideas ? :(
    katapulta^
    URL to post: