View Issue Details

IDProjectCategoryView StatusLast Update
0003358The Dark ModAIpublic28.03.2013 00:19
Reportersotha_sil Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 1.08 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003358: Cannonball damages player differently than AI
DescriptionA cannonball fired at an AI hurts him.

A cannonball fired at the player kills him.

http://forums.thedarkmod.com/topic/14615-watch-out-for-sudden-death/page__view__findpost__p__308076

TagsNo tags attached.

Activities

grayman

grayman

26.03.2013 19:18

administrator  

maps (1).zip (1,903 bytes)
grayman

grayman

27.03.2013 01:22

administrator   ~0005244

If I change damage_cannonball to inherit from damage_moveable (the cannonball is a moveable), then the effect on the AI and the player is similar.

However, back when I was experimenting with dropping crates on AI, we decided that moveables should not kill AI.

What happens with a moveable is that it will take no more than 1/2 of the actor's health each time it hits.

So with each cannonball hit, the guard's health goes down like this:

100->50->25->12->6->3->1->1->1 ...

If the intent is to kill the guard with the cannonball (which makes sense), I need to add a spawnarg to damage_moveable that allows that to happen.
grayman

grayman

27.03.2013 12:09

administrator   ~0005245

In 1.08, moveables with enough mass can kill AI with small mass (<5). AI with larger mass aren't allowed to be killed.

By adding a "kill_all" spawnarg to damage_moveable, we'd skip the small mass check.

I would also have the code look at any "damage" spawnarg on the object itself, letting that override what's in damage_moveable.

Then the mapper could adjust the object's "damage" value to whatever, and tweak it so it takes N hits to kill.

Oddly enough, velocity isn't used. I don't remember exactly why, but I think it's because the code is run after the collision, at which point the velocity of the moveable could be anything, including moving away from the AI.
grayman

grayman

28.03.2013 00:17

administrator   ~0005248

Add “kill_all” spawnarg to damage_moveable. If “1”, moveables are allowed to kill AI. Default is “0”.

Code will read the "damage" spawnarg on the moveable, letting it override the "damage" setting in damage_moveable.

rev. 5727:

Actor.cpp
Player.cpp
grayman

grayman

28.03.2013 00:19

administrator   ~0005249

Use this for damage_cannonball:

entityDef damage_cannonball
{
   "inherit" "atdm:damage_moveable"
   "damage" "15"
   "push" "6"
   "kill_all" "1"
   "editor_usage" "Damage effect when a cannon ball hits an AI. Gotta hurt, that one. heh."
}

The "damage" setting of "15" will kill an AI or the player in 2 or 3 strikes.

Issue History

Date Modified Username Field Change
26.03.2013 19:18 grayman New Issue
26.03.2013 19:18 grayman Status new => assigned
26.03.2013 19:18 grayman Assigned To => grayman
26.03.2013 19:18 grayman File Added: maps (1).zip
26.03.2013 19:19 grayman Reporter grayman => sotha_sil
26.03.2013 19:19 grayman Assigned To grayman =>
26.03.2013 19:19 grayman Assigned To => grayman
26.03.2013 19:19 grayman Status assigned => new
26.03.2013 19:20 grayman Assigned To grayman =>
27.03.2013 00:33 grayman Assigned To => grayman
27.03.2013 00:33 grayman Status new => assigned
27.03.2013 01:22 grayman Note Added: 0005244
27.03.2013 12:09 grayman Note Added: 0005245
28.03.2013 00:17 grayman Note Added: 0005248
28.03.2013 00:19 grayman Note Added: 0005249
28.03.2013 00:19 grayman Status assigned => resolved
28.03.2013 00:19 grayman Resolution open => fixed
28.03.2013 00:19 grayman Fixed in Version => TDM 2.00
28.03.2013 00:19 grayman Target Version => TDM 2.00