It is currently Sat Aug 19, 2017 2:04 pm


Post a new topicPost a reply Page 1 of 1   [ 3 posts ]
Author Message
 Post subject: Giving monsters immunity
PostPosted: Sat Aug 17, 2013 10:59 pm 
Cyberdemon
Cyberdemon

Joined: Sun Mar 13, 2011 4:45 am
Posts: 2286
Hello,
I am working on a Dalek mod of Doom. There will be Dalek enemies and dalek-controlled humans.
I want to make it so that Daleks take 25% damage from bullets (and only weak to an invisible projectile).
How would I do this?


Top
 Offline Profile  
 
 Post subject: Re: Giving monsters immunity
PostPosted: Sun Aug 18, 2013 2:08 am 
Spider mastermind
Spider mastermind
User avatar

Joined: Mon Dec 20, 2010 3:52 pm
Posts: 847
Location: Finland
Well I already talked about this in Steam chat but in case someone else needs the information...

As an example in ZDoom Wars, bosses are immune to damage type called "annihilate".

It's done by defining a projectile in Decorate that has
Code:
damagetype "annihilate"


The boss creature itself then has
Code:
damagefactor "Annihilate", 0

which basically means that the amount of the damage from "annihilate" damage is multiplied by the number that in this case is zero.


Not really that complicated.. I'm not sure if it can be done with hitscan attacks too but it propably can somehow.
Correct me if I'm somehow wrong in something, it's been a while since I've done anything :lol:

Here's some example code if someone doesn't know much about decorate and needs to see the whole thing:

Spoiler: the projectile
Code:
actor RandomMissile : Projectile
{
   radius 3
   height 3
   speed 25
   //seesound "rocket/shoot"
   damagetype "annihilate"
   +DONTREFLECT
   +BLOODSPLATTER
   states
   {
...
   }
}


Spoiler: the boss monster
Code:
actor BattleLord
{
  hitobituary "%o got stomped by %k's Battlelord."
  health 3600
  radius 40
  height 110
  mass 4000
  speed 12
  seesound "battlelord/sight"
  painsound "battlelord/pain"
  deathsound "battlelord/death"
  activesound "battlelord/active"
  dropitem "largemana" 256 25
  damagefactor "Annihilate", 0
  damagefactor "Ridiculous", 0.6
  MONSTER
  +FLOORCLIP
  +NORADIUSDMG
  +QUICKTORETALIATE
  +NOICEDEATH
  +NODROPOFF
  +NOPAIN
  +DONTRIP
  -PUSHABLE
  +MISSILEMORE
  +MISSILEEVENMORE
  -COUNTKILL
  states
  {
....
}

_________________
Image


Top
 Offline Profile  
 
 Post subject: Re: Giving monsters immunity
PostPosted: Sun Aug 18, 2013 4:04 am 
Cyberdemon
Cyberdemon

Joined: Sun Mar 13, 2011 4:45 am
Posts: 2286
Thank you Vilde!
I've also been working on a mod, my friend always reports a crash when using the weapon I programmed.
Code:
Actor Rifle:Pistol replaces Pistol
{
Weapon.SlotNumber 2
Weapon.AmmoType "Clip"
States
{
Fire:
    PISG A 4
    PISG B 6 A_GunFlash
    PISG B 0 Bright A_FireCustomMissile("pistolbullet",0,1,8)
   PISG B 0 A_PlaySound("weapons/pistol", CHAN_WEAPON)
    PISG C 4
    PISG B 5 A_ReFire
    Goto Ready
}
}

Code:
Actor riflebullet
{
  DamageType "rifledamage"
  height 8
  radius 6
  damage 5
  speed 1000
  renderstyle Add
  alpha 1
  seesound "misc/shot"
  deathsound "misc/shotx"
  PROJECTILE
  +RANDOMIZE
  states
  {
  Spawn:
    TNT1 A 3 bright
    loop
  Death:
    TNT1 A 6 bright
    stop
  }
}

I don't have any problem but he does.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 3 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron


Free forum hosting is powered by phpBB. Style by Daniel St. Jules of Gamexe.net.