Entity name of portal "bullet"

Avatar
Mr. Happy
61 Posts
Posted Jan 03, 2011
Hey guys, I'm wondering if anyone knows, what is the classname of the portal "bullet" that flies through the air? I assume it has a name, it should be an entity even if it has no proxy or fgd for Hammer.
Advertisement
Registered users don’t see ads! Register now!
Avatar
Whysopro?
154 Posts
Posted Jan 03, 2011
Replied 12 minutes later
I believe bullets are not calculated with an entity. They are just a simple particle effect, as is with any other game.
Avatar
Mr. Happy
61 Posts
Posted Jan 03, 2011
Replied 10 hours later
That doesn't seem right to me, I don't think the portal gun uses a traceline like bullet weapons but rather a projectile so that impacts can be delayed until it reaches a surface. I would assume that it would be a particle effect emitted from an edict, and if there is an edict involved I should be able to filter for it's classname, but then again you may be right and there is nothing beyond the particles. But IIRC modern hard coded particle effects still use a spawned info_particle_system, can any programmers confirm any of this, or am I really SOL?
Avatar
Whysopro?
154 Posts
Posted Jan 03, 2011
Replied 1 hour later
Btw if nobody understood that...iirc means "If I remember correctly" and sol is "Shit I am out of luck"

Anyways, you could be right that it spawns a particle system but that would be hard coded into portal itself, not anywhere near hammer. If they had a mod tool to really, and I mean REALLY crack open portals binaries....then you could get a hold of it. But it wouldn't be detectable ingame or by hammer.

EDIT: I am going to do a test anyways. Ill go in third person (I think theres a way) and then turn on wireframe.

Avatar
hanging_rope
435 Posts
Posted Jan 03, 2011
Replied 2 hours later
I think what it does (Because this is what I would do if I were valve) is

OnFireGun(
Check distance to object X in crosshair;
Fire Particles towards x;
Wait (distance * 0.1) seconds;
Kill Particles;
Open Portal at X;
)

Of course, I could be completely wrong.

Avatar
Whysopro?
154 Posts
Posted Jan 03, 2011
Replied 49 minutes later
That's what I figured as well. Seems to be the easiest and least expensive method.
Avatar
Mevious
205 Posts
Posted Jan 03, 2011
Replied 11 minutes later

hanging_rope wrote:
I think what it does (Because this is what I would do if I were valve) is
OnFireGun( Check distance to object X in crosshair; Fire Particles towards x; Wait (distance * 0.1) seconds; Kill Particles; Open Portal at X; )
Of course, I could be completely wrong.

This would imply that immediatly when you fire the gun, the portal's end position is set and unchangeable.

Consider this case: If you fire a portal that would have hit a normal wall, but then something gets in the way after the shot has been fired, does that thing block the projectile, or does it just move straight through it and hit the wall? My guess from experience is that the "bullet" would be blocked, and that means there's something else happening in the code.

Avatar
Whysopro?
154 Posts
Posted Jan 03, 2011
Replied 2 hours later
EDIT: Whoops, firefox error made me send it twice.
Avatar
Whysopro?
154 Posts
Posted Jan 03, 2011
Replied 1 minute later

Mevious wrote:
My guess from experience is that the "bullet" would be blocked, and that means there's something else happening in the code.

Actually no....A beam shot at a surface will go straight through any objects that move into it's path. That being said also proves hanging_ropes point. It's most likely predetermined then executed.

For instance, if you complete chamber 13 (peptic salve and adrenalin) with the standard 13s ninja method, you must shoot the portal then jump off the button which closes the door infront of your beam.

Avatar
WinstonSmith
940 Posts
Posted Jan 04, 2011
Replied 20 hours later
Alrighty, ran a simple test. Fired up Portal, loaded a sparse/empty map, fired a portal, and before it it the wall I opened the console and used ent_fire to look through the entities. A few interesting things:
--For each prop_portal (blue and orange) there is a portalxspeaker and portalxmic, with x being 1 or 2.
--There is an entity called "bignet" in every map. I'm not sure what it does, and it must be something stuck in at runtime. I really should look into it one of these days and see if it's just in Portal or throughout the Source engine.
--There was no entity--at least in this list--that appeared while the portal projectile was in midflight.
So at this point, it looks like you're out of luck. Unless it's given special instructions in the code to remain some sort of hidden entity, I'm betting that it's just a ray-traced particle thing that isn't even named or originating from an info_particle_system placed ad hoc by the game, since the entire projectile is made up of particles.
Avatar
Whysopro?
154 Posts
Posted Jan 04, 2011
Replied 23 minutes later
BAM! Right there. Thanks Winston!
Avatar
WinstonSmith
940 Posts
Posted Jan 04, 2011
Replied 27 minutes later

Whysopro? wrote:
BAM! Right there. Thanks Winston!

Well, no problem, but like I said, the results are inconclusive, because there's a good chance any sort of "bullet" would have a name but just be hidden. To find it, you'd probably have to delve into the source code. But for obvious reasons, you'd have to go the next best route, which is digging through the binaries, and if you can do that, best of luck to you.

Avatar
King Of Sandvich
15 Posts
Posted Jan 05, 2011
Replied 8 hours later
I did a little testing with that "bignet" entity. I loaded HL2 on d1_trainstation_02 and it showed up. I also figured out that it's pretty darn important, since when I did "ent_fire bignet kill" all the ground-based npcs in the map froze in their tracks, but still responded to being used. Maybe bignet is short for "big network of ai nodes" but I'm still not sure. All I know now is that it's an important part of the source engine and that it has nothing to do with the portal bullet.

I think it probably is a trace system, since when I shoot a portal to a very far wall, then open one of the same color on a wall right next to me, the first particle stays, but nothing happens when it reaches the wall. This suggests to me that the game just resets where/when the portal will open, but keeps processing the particles.

Advertisement
Registered users don’t see ads! Register now!
Avatar
WinstonSmith
940 Posts
Posted Jan 05, 2011
Replied 15 hours later

King Of Sandvich wrote:
I did a little testing with that "bignet" entity. I loaded HL2 on d1_trainstation_02 and it showed up. I also figured out that it's pretty darn important, since when I did "ent_fire bignet kill" all the ground-based npcs in the map froze in their tracks, but still responded to being used. Maybe bignet is short for "big network of ai nodes" but I'm still not sure. All I know now is that it's an important part of the source engine and that it has nothing to do with the portal bullet.

I think it probably is a trace system, since when I shoot a portal to a very far wall, then open one of the same color on a wall right next to me, the first particle stays, but nothing happens when it reaches the wall. This suggests to me that the game just resets where/when the portal will open, but keeps processing the particles.

You're probably right about the nodegraph thing. It seems odd that a map would have an entity and an AIN file, though. Perhaps it's an entity that references the external AIN file.