- Code: Select all
var bool bNotDead;
I was wrong, it looks like a "local" variable which is not changeable within preferences.
Otherwise it would've been var() bool or var(ScriptedPawn) bool or something.
<s>If what you're making is a singleplayer map, then I guess you could make a mission script which would knock out the NPC. See the Mission00 class:</s>
- Code: Select all
class Mission00 extends MissionScript;
function FirstFrame()
{
local UNATCOTroop troop;
local LAM lam;
Super.FirstFrame();
// zero the player's skill points
Player.SkillPointsTotal = 0;
Player.SkillPointsAvail = 0;
if (localURL == "00_TRAINING")
{
// knock this guy out
foreach AllActors(class'UNATCOTroop', troop, 'Test_Subject')
{
troop.HealthTorso = 0;
troop.Health = 0;
troop.bStunned = True;
troop.TakeDamage(1, troop, troop.Location, vect(0,0,0), 'KnockedOut');
}
}
else if (localURL == "00_TRAININGCOMBAT")
{
// fool a lam into thinking that the player set it
foreach AllActors(class'LAM', lam, 'Bot1LAM')
lam.SetOwner(Player);
}
}
Upd: sorry did not read your above message.
Machina wrote:So I've set up a class-trigger to toggle when a -carcass hits the floor. It works when the player kills him but not when he knocks him unconscious. Does anyone know why this is?
Could you just post the code?