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

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

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

Enemy weapon/item drops

User is offline   Never Forgotten 

  • 241

#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. :dukeaffirmative:

Who Loves Ya Baby?

Never Forgotten/Focus Gaming
0

User is online   Trooper Dan 

  • Duke Plus Developer
  • 3,678

#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

User is offline   Never Forgotten 

  • 241

#3

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

Who Loves Ya Baby?

Never Forgotten/Focus Gaming
0

User is offline   Hank 

  • 2,152

#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.

Ein sarkastischer Deutscher
1

User is offline   Never Forgotten 

  • 241

#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!

Who Loves Ya Baby?

Never Forgotten/Focus Gaming
1

User is offline   Zaxtor 

  • 1,592

#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"

Trequonia TC's Status:
Levels : 100% done - Textures : 100% done - Sounds : 100% done - Musics :100% done
Mod is finished, going to test it.
Trequonia's Official website
1

Share this topic:


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


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options