View Full Version : Duke Nukem 3d ammo droppings.
FATAL
February 22nd, 2004, 09:40 AM
I started to play duke nukem 3d, and immediatly I noticed that enemies drop ammo randomly when they die, and most of them don't. I find this very annoying, since it's now pretty much about luck that do I get enough ammo to fight properly. Well it isn't that big problem, but my question is, that is this meant to be in Duke 3d, or is my game just bugged somehow?
ToXiCFLUFF
February 22nd, 2004, 10:51 AM
It's meant to be in there, I think. A better system in this case, in my opinion, would be to drop ammo depending on how much ammo the player currently has. This is how I do it in my Doom mods, and it works pretty well because you can always keep the player on their toes.
FATAL
February 22nd, 2004, 11:27 AM
Bah, I really don't like the duke 3d style. However your one sounds pretty nice at least to me!
doomjedi
February 22nd, 2004, 11:29 AM
Fatal, in duke3d you can change what aevery monster leave when it dies and what is the chance factor for such thing happen. You can have any monster drop any ammo or sprite.
All of this is inside the game.con file, which is very easy to edit.
FATAL
February 23rd, 2004, 05:45 AM
ooooooh! Thanks, I'll try that right away!
Bah, I found it that the file was WAY too big for a lazy person like me to scan through carefully. And I looked around for some clues about the thing I look for, can't find anything though.
doomjedi
February 23rd, 2004, 01:26 PM
Come on, it's very easy, I did lot's of stuff with that file - trashcans shoot bazookas at you, troopers fly and shoot mortars to the ground, BOSS 1, 2 3 walking around usual levels and tons of other stuff!!!Duke Nukem compiles the con files before every startup, so everything you edit there goes into Duke :-)
state drop_ammo
ifrnd SPAWNAMMOODDS (if random ___)
spawn AMMO (create sprite AMMO)
ends
state drop_battery
ifrnd SPAWNAMMOODDS
spawn BATTERYAMMO
ends
state drop_sgshells
ifrnd SPAWNAMMOODDS
spawn SHOTGUNAMMO
ends
state drop_shotgun
ifrnd SPAWNAMMOODDS
spawn SHOTGUNSPRITE
ends
state drop_chaingun
ifrnd SPAWNAMMOODDS
{
ifrnd 32
spawn CHAINGUNSPRITE
else
spawn BATTERYAMMO
}
ends
Now SPAWNAMMOODDS is a simple number defined in user.con - 128=50% chance, 256 = 100 % chance
BTW for you to understand the game.con better:
**************************************8
ifspawnedby (actor) if actor stand on/meet current actor ...
ifhitspace if 'space' was pressed
ifcansee if can see the player
ifactioncount (int)
ifphealthl (int) if player health low than ...
ifpdistl (int) if player distance low than ...
ifpdistg (int) if player distance great than ...
ifp (paction) if player doing action 'paction' ...
ifhitweapon (weapon) if was hit by weapon ...
ifdead if dead
ifinwater if underwater
ifonwater if walking on water
ifrnd (int) if random x/256 (random 128 -> p=0.5)
ifsquished if squished
ifcount (int)
ifaction (action)
ifgotweaponce (weapon) if player has weapon ...
ifinventory (inventory)
ifcanseetarget
ifmove (move)
ifwasweapon (weapon) if weapon was ...
iffloordistl (int) if distance to from the floor low than...
ifceilingdistl (int) if distance to the ceiling low than...
ifrespawn
ifgapzl (int)
ifcanshoottarget if can shoot target
ifnotmoving if not moving
ifai (ai)
ifspritepal (int)
ifawayfromwall if not near the wall
ifactornotstayput
ifbulletnear if bullet is near
ifmultiplayer if multiplayer mode
************************************************** **********************
pkick
************************************************** **********************
IFP
************************************************** **********************
ifp ponground if player on the ground
pfalling falling
pstanding standing
pducking ducking
pwalking walking
pwalkingback walking back
prunning running
prunningback running back
pjumping jumping
pkicking kicking
pfacing facing another player (multiplayer)
ponsteroids on steroids
pjetpack using jetpack
phigher is higher
palive is alive
pshrunk is shrunk
pdead is dead
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.