NPC characters helping you in maps

Posted Aug 12, 2011
I'm a beginner and I want to know if it is possible for a NPC character help you through a map. If it is possible, how?

For example, chell in SP has Atlas or P-body help her throughout the map.

Advertisement
Registered users don’t see ads! Register now!
Posted Aug 12, 2011
Replied 1 hour later
I think it would be possible (albeit it very complicated) using triggers and targets for the NPC to shoot portals at, but it would be very clunky unless the NPC was just pressing buttons to activate bridges and the like. A proper intelligent NPC bot doesn't exist for Portal 2 I don't think.
Posted Aug 12, 2011
Replied 19 minutes later
I was thinking it can help with shooting portals, help kill turrets, and every thing that you pretty much have to do when you are solving a puzzle.

Since Portal 2 runs the source engine like half life, and half life has npcs helping you.

I was thinking of having Atlas helping chell through the testing

Posted Aug 12, 2011
Replied 6 minutes later
There's a big difference between simply coding an enemy to shoot directly at you with a weapon and having an AI think like a person. The AI's portals would have to be pre-determined. Ask someone more experienced about it.
Posted Aug 12, 2011
Replied 28 minutes later

spongylover123 wrote:
I was thinking it can help with shooting portals, help kill turrets, and every thing that you pretty much have to do when you are solving a puzzle.

Since Portal 2 runs the source engine like half life, and half life has npcs helping you.

I was thinking of having Atlas helping chell through the testing

The AI in Half-Life 2 for allies isn't really that advanced. They simply trail behind you, and enter combat mode whenever enemies spot you. At certain areas of the game, they entered scripted sequences. They don't actually have any logic or thought. It would be very difficult, as I don't believe there's currently anyway to make an AI shoot a portalgun, or at a specific position, and the Portal 2 authoring tools don't extend into modding yet.

Avatar
305 Posts
Posted Aug 12, 2011
Replied 3 minutes later
Actually, if there's an attachment point on the robot's arm, which there almost certainly is, you can parent a weapon_portal gun to it and send it inputs of FirePortal1 and FirePortal2 - and there's probably a way of doing it with scripting, therefore.
Posted Aug 12, 2011
Replied 1 hour later
cough

The fact still remains that since we have no access to the Portal 2 code there's no way to add NPCs. I suppose you could use a prop_dynamic and a LOT of scripting/logic work but it would be touchy at absolute best.

Avatar
305 Posts
Posted Aug 12, 2011
Replied 5 minutes later
I know, I was just helping with the portal gun thing; I agree, and unless you're one-hundred percent certain that you can pull this off, I wouldn't waste effort on it; wait for better tools to be released, may haps.
Posted Aug 12, 2011
Replied 4 hours later
You can't make NPCs, but you can make a workable substitute. For example, I making a boss battle that involves a "Security Defense System." Now there aren't any security-ish props that I can place so I have to make do with what I already have. As obscure as this sounds but I made a boss made out of a Turret, 2 Wheatley's Shields, and a few rotating lasers beams.

As for Altas and P-Body, they have prop_dynamic animations that could be used to see them moving, but you would need to create a "path" using brushes to actually move them. I'm sure there is a tutorial somewhere that involves prop_dynamic's following a path.

BTW P-Body was seen in SP at one of Wheatley's Chambers running away so it's not impossible.

Advertisement
Registered users don’t see ads! Register now!
Posted Aug 12, 2011
Replied 54 minutes later

MasterLagger wrote:
BTW P-Body was seen in SP at one of Wheatley's Chambers running away so it's not impossible.

That is actually an animation that is played when the player looks in p-body's general direction. It does not follow any path set by different entities, and the dynamic prop is disabled when the animation is finished.