Please or Register to create posts and topics.

Changing Linkage ID

Hey, what's the best way to change the linkage id of the coop players' portals?
I want both players to have the same ID and the "same color" and both of them should link up with a single button activated portal.
I did this with console commands, but I'm just wondering if there is a more elegant way of doing it. (Also, I have no idea how I can change sv_cheats to 1 from the map...)

- Science isn't about why, it's about why not!

There's an entity called point_servercommand that lets you run console commands on the server. If you just need to run them on the client use a point_clientcommand.

Falsi sumus crusto!

Aren't there Parms for the portals?

Yes, but if you change them you get different portals. As in, the gun looks to move the portal with the proper linkage and type. If you change the linkage it will just create a different portal instead.

Falsi sumus crusto!

It is impossible for a set of linked portals to have the same color when using linked IDs, however it is possible to recolor the portals fakingly. See post85762.html#p85762

?????????????????????????????TWP Releases | My Workshop

What I meant by "color" was the primary and secondary portals. I can't english, apparently..
So I want both players to only have their primary portals and they would link to a single button-activated second one. Obviously only one player-portal could be opened at a time, because this way we only have 3 portals instead of two pairs.

I tested this with console commands, I'm just asking if there is another way.

- Science isn't about why, it's about why not!

So you want 3 portals eh... This is in fact possible if you only want one pair open at once and requires a bit of logic.

Make the static portal always have the same linked ID and a unique classname.
When you place a portal change the classname of it through a fired portal event. - you can reference it by using prop_portal as the static portal is a different classname.
After a short delay, change the linkage ID of the recently placed portal to that of the static portal and change the other players portal ID to something different.

If you're interested, decompile FreakyChicken's Portals of Doom and Friendship prt1 and look at the entites that take care of the linked portals. (Logic_eventlistener).

?????????????????????????????TWP Releases | My Workshop

Thanks, this is doing something, but I'm still having problems.
I can't deactivate the other player's portal. I tried every combination of everything I could think of, but nothing.. Though I might be just a noob :P
The last three pictures here are some examples. I'm not sure what I'm doing wrong...

- Science isn't about why, it's about why not!