What's the class name for unconscious NPC's?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

What's the class name for unconscious NPC's?

Postby Machina » Fri Dec 31, 10 12:53 am

I need to know the class name for unconscious NPC's. Corpses have easy class names, terroristcarcass, mechaniccarcass, etc. What are the unconscious "corpses" called? I have a trigger that the player needs to activate by knocking someone unconscious but if I use -carcass it only works if he actually kills the NPC.
Machina
Newbie
 
Posts: 54
Joined: Sun Feb 14, 10 1:49 am

Postby Dae » Fri Dec 31, 10 2:25 am

Unconscious corpses are corpses with bNotDead property set to true.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Machina » Sun Jan 02, 11 6:56 am

I don't find any bNotDead property in the carcass properties.

I need to know the classname for unconscious characters, is there one?
"No I don't smoke meth. This is just a natural talent I have."
Machina
Newbie
 
Posts: 54
Joined: Sun Feb 14, 10 1:49 am

Postby Alex » Sun Jan 02, 11 10:36 am

DeusExCarcass wrote:var bool bNotDead; // this body is just unconscious


Not in the carcass properties?

And as Dae said, there is no classname. A dead body and an unconscious body is the same class.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Machina » Mon Jan 03, 11 9:05 am

Ok, the thing is I've got this NPC that needs to be either killed or knocked unconscious by the player. 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?
"No I don't smoke meth. This is just a natural talent I have."
Machina
Newbie
 
Posts: 54
Joined: Sun Feb 14, 10 1:49 am

Postby Dae » Mon Jan 03, 11 3:22 pm

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?
Last edited by Dae on Mon Jan 03, 11 3:26 pm, edited 3 times in total.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Machina » Tue Jan 04, 11 6:26 am

I'm not coding. I'm just building maps.

It seems I'll have to create a missionscript for it. The first level in Deus Ex has the same thing when at the top of the statue you can knock out the UNATCO troop and take his assaultgun. Then later Manderley says the soldier turned up dead or unconscious. I think that was done with missionscript too. What I want to do isn't even that elaborate, I just want to trigger something with a corpse (using a normal trigger set to trigger only a specific class, in this case terroristcarcass) But the problem is that it won't trigger if you knock the terrorist unconscious, it only works if you kill him. I can't really figure out why.

Well, since my coding skills are crap and the map isn't finished yet I'll have to look into it some other time. Thanks for posting that code! And yeah it's a single player map.
"No I don't smoke meth. This is just a natural talent I have."
Machina
Newbie
 
Posts: 54
Joined: Sun Feb 14, 10 1:49 am


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 25 guests
cron