Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

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
Posted

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

  • 3 months later...
Posted (edited)

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

Posted

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.

Posted (edited)

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

Posted

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.

Posted

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

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 2 replies
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...