Jump to content
The Dark Mod Forums

Objective: Don't take hits from zombies


Dragofer

Recommended Posts

It crossed my mind that zombie-related scenarios could do with this kind of setup:

 

- Objective: Don't take hits from zombies.

- Script: If the player takes 2 or 3 hits or 40 damage from the zombie team...

- If failed: trigger a scripted sequence, like fading vision, coughing, "collapse" via a camvator, fail mission

 

 

Arguably not for all scenarios, i.e. if the zombies are resurrected corpses, but I reckon it'd make things more believable when all the AIs were clearly zombified by contagion, even more so if it happens while the player is around.

 

 

The part I'd like to ask about: how to tell the damage came from a zombie?

Edited by Dragofer
Link to comment
Share on other sites

I do not know if you can track where the player gets damage.

 

A simpler way would be

"Do not let the zombies get close to you (melee range)."

 

Bind a trigger on the zombie. If the player gets too close to the zombie and trigger is fired, run a script. The script makes the player play "cough cough" sound effect and whatever you want.

 

For gameplay purposes, you could make it easier for the player. Let's say the mission has a global variable "contagion" it starts at 0. Every time the zombie trigger is fired, the contagion is increased by one.

 

Now you could have various effects like

contagion 0 no effects

contagion 2 player coughs a bit

contagion 4 player coughs a lot and takes one time damage of 25 (healable with health potion)

contagion 8 player coughs a lot, heartbeat pounding, player takes one time damage of 50 (healable with health potion)

contagion 10 player takes one time damage of 1000 (dies) and play zombification sound effect.

 

Alternatively you could remove the contagion variable altogether and simply have the zombie trigger run coughing and start a special script that sickens the player who steadily loses hp for a while.

  • Like 3

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

you could use the stim/response system,

stim on zombie

response on player

or visa-versa

(be a bit like zombie has radiation and player gets too close then radiation hurts player)

maybe if fire burns the player then a custom stim/response could do the same type of thing.

  • Like 1
Link to comment
Share on other sites

You could alter the damage def used by the zombies so that the attack applies a stim at the player that could get counted. This is basically how holy water arrows work for example. They create a holy water stim once they hit a surface that deals extra damage to undead.

  • Like 2

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

  • 3 months later...

Necromancy seems fitting enough for this thread...

You could alter the damage def used by the zombies so that the attack applies a stim at the player that could get counted. This is basically how holy water arrows work for example. They create a holy water stim once they hit a surface that deals extra damage to undead.

Is it actually possible to apply a stim via a damage def? If memory serves, what projectiles do on impact is spawn a result entity, which can carry stims just like any other entity that has a location in the world. But zombies do melee damage. When I've previously asked about applying stims via melee attacks, nobody had a simple way to do it. (This would also apply to a question I had about identifying which weapon the player was doing damage with.)

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

If I understand correctly, the fire arrow (as an example) uses a damage defnition with the spawnargs "has_result" and "def_result", that (as you correctly said) spawns a result entity. So, if you would create a damage definition that has a "has result" "1" and a "def_result" "custom_damage_result" with the latter just having a stim definition (see fireball or fire arrow) and give this damage to zombies it might work.

Link to comment
Share on other sites

It's the projectile entity that has the "has_result" and "def_result" spawnargs, not the damage defs. The standard set-up for projectiles seems to be that they 'detonate' on impact, removing the projectile entity and spawning any specified result entity (and projectile and result can each have a def_damage, e.g. atdm:result_projectile_rock inherits from atdm:moveable_rock_small so it has atdm:damage_moveable). For melee, I think what happens is that the "melee" frame command is used with the damage def.

anim melee_attack   		models/md5/chars/undead/zombie/zombie_attack_lefthand.md5anim
   	{
	frame 12    sound snd_swing
        frame 15    melee melee_zombie_Left

    }

Which is basically where we ended up before. It's possible to spawn entities via frame commands, and to call script functions: SteveL made a script to apply a stim specifically to the target of an attack. So it's possible, with some customisation of the anim defs. I queried Obsttorte's comment about just specifying a stim in a damage def because that would be so much simpler and more convenient.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

What happens when you add "has_result" "1" and "def_result" "atdm:result_arrow_firearrow" to the definition of "melee_zombie_Left/Right"? Should this not lead to the melee attack having the result? That way you could immediately see, if the result can also be added to a melee attack (in this case it should cause an explosion). If this works, it would be possible to use this "result" system for melee attacks as well.

Another idea: You could redefine the zombie's attack and make it a ranged attack with a very low range and the regular animations. That way you could create an invisible projectile and use the known entity approach.

Link to comment
Share on other sites

I don't think that the result approach can be applied to melee attack. If I am not completely wrong the result system is restricted to idProjectile spawnclass entities.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...