Duke4.net Forums: Enemy weapon/item drops - Duke4.net Forums

Jump to content

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

Enemy weapon/item drops

#1

I've been tinkering with an idea of Atomic Crisis, but I don't know how to do it. It may have been asked before, and it may be answered somewhere in the forums or on the wiki, but I don't really have the time/patience to look for it. Anyway, is there a way to make enemies drop more than just ammo? Sort of like how Pig Cops drop a Shotgun/Shotgun ammo, or used armor, but instead have them drop little bits of health and armor each time, similar to Doom 4 and Doom Eternal. I think this would really improve gameplay, and make it a little easier to bear through some of the levels I'm making. Don't worry, weapons pack more punch.... sorry, sidetracked, if there's a way to have them drop health/armor along with a weapon, please let me know how to do so. Thank you. :(
0

User is offline   Danukem 

  • Duke Plus Developer

#2

Let's start with what you know. Do you understand how the code in GAME.CON makes the liztroops, pigcops and enforcers drop ammo? If you do, then this is going to be very easy.
2

#3

Sadly, I'm extremely naive with coding. I've been trying to learn it, I just haven't found the time.
0

User is offline   Hank 

#4

View PostNever Forgotten, on 17 August 2018 - 10:52 PM, said:

..., but instead have them drop little bits of health and armor each time, ....

https://wiki.eduke32.com/wiki/Confaq42
then scroll down to
Example 2: Rubber Trash Cans Spawn Health When Destroyed

It was written for beginners in mind, and explains the very basics of spawning an item from an actor.
1

#5

View PostHank, on 18 August 2018 - 09:43 PM, said:

https://wiki.eduke32.com/wiki/Confaq42
then scroll down to
Example 2: Rubber Trash Cans Spawn Health When Destroyed

It was written for beginners in mind, and explains the very basics of spawning an item from an actor.


Thank you! This worked! This is really going to help me complete my vision for Atomic Crisis!
1

User is offline   Zaxtor 

#6

Item / ammo drop is random


Inside the pigcop you'll see "drop_shotgun" inside the first part of the state example "state checkpighitstate" in the pigcop you'll find "state drop_shotgun" inside the checkpighitstate


Outside the pigcop code you'll find (v) alongside other codes below **

state drop_shotgun
ifrnd SPAWNAMMOODDS
spawn SHOTGUNSPRITE
ends



**
For other mobs that randomly drop items.

state drop_ammo
ifrnd SPAWNAMMOODDS
spawn 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





you can find it by typing in the GAME.CON "Ctrl + F" and type example "drop_shotgun"
1

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