Duke4.net Forums: Infinite ammo in EDuke32? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Infinite ammo in EDuke32?

User is offline   Nevander 

#1

I was wondering if there is a simpler non-hacky way to enable it for having fun and messing around, or testing maps for example. I couldn't find any cvar or command built-in to EDuke to do it. Maybe one could be made? Anyway this is what I'm doing at the moment.

Right now I have three script files set up. They are named "infammo_enable.cfg", "infammo_disable.cfg", and "infammo_shoot.cfg" for ease of sorting. In my "settings.cfg" I have bound Kpad8 to exec the enable script and Kpad9 to exec the disable script.

The enable script contains:
bind mouse1 exec infammo_shoot.cfg


That script then contains:
gamefunc_fire
give ammo


Then the disable script contains:
unbind mouse1


The resulting effect is that every time mouse1 is held, it constantly execs the shoot script and it fires and then adds full ammo. Unbinding mouse1 thankfully only unbinds it from the key-related binds and MouseButton0 (left mouse) still remains as Fire to the game under the "eduke32.cfg", so I can still shoot even after unbinding.

This post has been edited by Nevander: 21 November 2015 - 05:14 AM

3

User is offline   Jimmy 

  • Let's go Brandon!

#2

I made a "var cheat" one time. This will also stop the pistol from reloading the magazine. I can't guarantee this is without bugs but I just tested it in a newer build of EDuke32 and it seemed to work fine.

Add this to GAME.CON between the line that says "include USER.CON" and "action ANULLACTION 0". To use the cheat just bring down the console (should be the ~ button) and type in "setvar greed 1" or "setvar greed 0" to turn it off.

gamevar greed 0 0

onevent EVENT_GAME

ifvare greed 1
{
setplayer[THISACTOR].ammo_amount 1 MAXPISTOLAMMO
setvar WEAPON1_CLIP 0
setplayer[THISACTOR].ammo_amount 2 MAXSHOTGUNAMMO
setplayer[THISACTOR].ammo_amount 3 MAXCHAINGUNAMMO
setplayer[THISACTOR].ammo_amount 4 MAXRPGAMMO
setplayer[THISACTOR].ammo_amount 5 MAXHANDBOMBAMMO
setplayer[THISACTOR].ammo_amount 6 MAXSHRINKERAMMO
setplayer[THISACTOR].ammo_amount 7 MAXDEVISTATORAMMO
setplayer[THISACTOR].ammo_amount 8 MAXFREEZEAMMO
setplayer[THISACTOR].ammo_amount 9 MAXTRIPBOMBAMMO
setplayer[THISACTOR].ammo_amount 11 MAXGROWAMMO
}

ifvare greed 0
{
setvar WEAPON1_CLIP 12
}

endevent


Insert this instead of the code above to also get some other cheats I coded too. Setting kevorkian to 1 will cause the player to die. Setting maxpayne to 1 or 2 will produce a slow motion effect, 2 is slower than 1. Set maxpayne to 0 to turn it off.

gamevar greed 0 0
gamevar kevorkian 0 0
gamevar maxpayne 0 0

onevent EVENT_GAME

ifvare greed 1
{
setplayer[THISACTOR].ammo_amount 1 MAXPISTOLAMMO
setvar WEAPON1_CLIP 0
setplayer[THISACTOR].ammo_amount 2 MAXSHOTGUNAMMO
setplayer[THISACTOR].ammo_amount 3 MAXCHAINGUNAMMO
setplayer[THISACTOR].ammo_amount 4 MAXRPGAMMO
setplayer[THISACTOR].ammo_amount 5 MAXHANDBOMBAMMO
setplayer[THISACTOR].ammo_amount 6 MAXSHRINKERAMMO
setplayer[THISACTOR].ammo_amount 7 MAXDEVISTATORAMMO
setplayer[THISACTOR].ammo_amount 8 MAXFREEZEAMMO
setplayer[THISACTOR].ammo_amount 9 MAXTRIPBOMBAMMO
setplayer[THISACTOR].ammo_amount 11 MAXGROWAMMO
}

ifvare greed 0
{
setvar WEAPON1_CLIP 12
}

ifvare kevorkian 1
{
addphealth -5000
setvar kevorkian 0
}

ifvare maxpayne 1
{
inittimer 50
}

ifvare maxpayne 2
{
inittimer 25
}

ifvare maxpayne 0
{
inittimer 120
}

endevent


This post has been edited by Jimmy Gnosis: 22 November 2015 - 11:14 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options