> No I'm not promising it's gonna be released
----
So, how do you know with what NPC you're dealing AFTER you've spawned it yourself with Lua;
1
2
3
2
3
function spawnSoldier(x, y, rot) 	parse('spawnnpc 5 '..x..' '..y..' '..rot) end
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function _objDmgFunc(dynid, dmg, id) 	if object(dynid, 'type') >= 30 and object(dynid, 'type') <= 35 then 		_targetHudFunc(dynid, dmg, id, object(dynid, 'type')) 	end end function _targetHudFunc(dynid, dmg, id, npctype) 	parse('hudtxt2 '..id..' 49 "©255255255'..npcNames[npctype-29]..': '..object(dynid, 'health')..' health left" 320 5 1') end
It's pretty much about line 8; npcNames[npctype-29]. I searched the forums and found people saying a zombie is npc type 30, and headcrab npc type 31. But it is not.
Now, how do I find out what npc type/id I've just damaged?