[SP] Sendificate

Avatar
Groxkiller585
652 Posts
Posted Jun 05, 2012
Replied 4 hours later

HMW wrote:
Wow, that's quick Excellent work!

I don't entirely understand what you mean by "naming the coop portals". Did you pre-place named prop_portal entities in the map?

I was thinking about having two map-enveloping detectors, one for each portal ID. Each then sets the sendtor_active variable to something different so the script can tell them apart. But perhaps your method is easier. I'm looking forward to seeing what you made!

Correct, I made prop_portals and named them. Like I said there's probably a better way, but this was simplest to implement.

I am finishing it up, then i'll upload.

Advertisement
Registered users don't see ads! Register now!
Avatar
Groxkiller585
652 Posts
Posted Jun 05, 2012
Replied 48 minutes later
Here be the download link:

https://dl.dropbox.com/u/18219413/maps/sendificate_0_v3_src.zip

Contains the coop-compatible instances (all you really need to do is make sure logic_autos also have the same outputs but for OnMultiNewMap instead), a coop version of the test map and the new edited script, as well as what was in there previous.

Avatar
HMW
806 Posts
Posted Jun 09, 2012
Replied 3 days later
Nice work! I found one bug: both portals only transfer the beam in one direction (cyan to blue and yellow to red respectively). I think this is because of their order in the array and the fact that you skip over each player's second portal while scanning.

I changed the implementation slightly:
tech details
||The value type of the "sendtor_active" attribute has been changed from yes/no to a number. -1 means that the portal is closed, any number >= 0 means the portal is open, and that number is its linkage ID. The different portal detectors each get different outputs added to them, to set this up correctly.

When a beam trace starts, the script first builds an array containing all active portals and their IDs, in no particular order. When searching for a portal's partner, it just searches through that array until it finds a portal with a matching ID, that is not the "incoming" portal. (If no match is found, it means that the initially detected portal currently has no active partner, so we should disregard it.)

The nice thing about this is that it's not specific to coop. You could just as easily make a SP map with two sets of portals (like Mevious and Omnicoder have done), or have as many pairs open at once as the engine will allow without tripping over itself, if you so desire. As long as you add a detector for each ID you use, it will just work.||
By the way, I found out that "OnMapSpawn" does get triggered in coop, at least in splitscreen mode. So I'm holding off on duplicating all of the logic_auto outputs for now.

As soon as I'm done with the beam effect tweaks, I'll upload a new version of the source code.
Again, thanks for your help with this!

Avatar
Groxkiller585
652 Posts
Posted Jun 09, 2012
Replied 2 hours later

HMW wrote:
Nice work! I found one bug: both portals only transfer the beam in one direction (cyan to blue and yellow to red respectively). I think this is because of their order in the array and the fact that you skip over each player's second portal while scanning.

I changed the implementation slightly:
tech details
||The value type of the "sendtor_active" attribute has been changed from yes/no to a number. -1 means that the portal is closed, any number >= 0 means the portal is open, and that number is its linkage ID. The different portal detectors each get different outputs added to them, to set this up correctly.

When a beam trace starts, the script first builds an array containing all active portals and their IDs, in no particular order. When searching for a portal's partner, it just searches through that array until it finds a portal with a matching ID, that is not the "incoming" portal. (If no match is found, it means that the initially detected portal currently has no active partner, so we should disregard it.)

The nice thing about this is that it's not specific to coop. You could just as easily make a SP map with two sets of portals (like Mevious and Omnicoder have done), or have as many pairs open at once as the engine will allow without tripping over itself, if you so desire. As long as you add a detector for each ID you use, it will just work.||
By the way, I found out that "OnMapSpawn" does get triggered in coop, at least in splitscreen mode. So I'm holding off on duplicating all of the logic_auto outputs for now.

As soon as I'm done with the beam effect tweaks, I'll upload a new version of the source code.
Again, thanks for your help with this!

Like I said, there was probably a better way. Glad to know you found it!

OnMapSpawn works in ss_map, but not real coop. (ss_map is like a mix of sp and coop: certain things work there that will not (or are not garenteed to) in real coop. OnMapSpawn is one of things, which I found out while testing it extensively for a coop map I am making.)

Avatar
HMW
806 Posts
Posted Jun 11, 2012
Replied 1 day later

Groxkiller585 wrote:
OnMapSpawn works in ss_map, but not real coop. (ss_map is like a mix of sp and coop: certain things work there that will not (or are not garenteed to) in real coop. OnMapSpawn is one of things, which I found out while testing it extensively for a coop map I am making.)

Oh I see, good that you mention that. I'll include both outputs then.

Other question: does the per-map particle manifest no longer work in Portal 2?
I was trying to add a custom particle system for the beam effect, but it only works if the file is in the global particles_manifest.txt file. I also checked with Process Monitor if the game searches for any other map-specific file of that nature and found nothing. Would be a real bummer if that no longer works.

Avatar
Groxkiller585
652 Posts
Posted Jun 11, 2012
Replied 9 hours later

HMW wrote:
Groxkiller585 wrote:

OnMapSpawn works in ss_map, but not real coop. (ss_map is like a mix of sp and coop: certain things work there that will not (or are not garenteed to) in real coop. OnMapSpawn is one of things, which I found out while testing it extensively for a coop map I am making.)

Oh I see, good that you mention that. I'll include both outputs then.

Other question: does the per-map particle manifest no longer work in Portal 2?
I was trying to add a custom particle system for the beam effect, but it only works if the file is in the global particles_manifest.txt file. I also checked with Process Monitor if the game searches for any other map-specific file of that nature and found nothing. Would be a real bummer if that no longer works.

I haven't tested pakratting it in, but it might work. (Although pakrat doesn't look for a _particles.txt file for your map, which might be a bad omen...)

Avatar
HMW
806 Posts
Posted Jun 17, 2012
Replied 5 days later
New version is up! I did it without custom particles; just re-used the one for the tractor beam

The workshop description has a link to the current source code.
Again, thanks for helping out with the coop support, Grox!

Avatar
Groxkiller585
652 Posts
Posted Jun 19, 2012
Replied 2 days later

HMW wrote:
New version is up! I did it without custom particles; just re-used the one for the tractor beam

The workshop description has a link to the current source code.
Again, thanks for helping out with the coop support, Grox!

Glad I could help!

Avatar
FelixGriffin
2,680 Posts
Posted Jul 07, 2012
Replied 17 days later
By the way, couldn't you do it without the portal detector? Use a logic_playerproxy, then you have OnPrimaryPortalPlaced and OnSecondaryPortalPlaced outputs.
Avatar
HMW
806 Posts
Posted Jul 07, 2012
Replied 40 minutes later
No, because I also need to know when a portal closes. (Either via fizzlers or because of other reasons, e.g. moving surface.)

However, I didn't know about those outputs, so thanks for the tip! They might come in handy some time.

Avatar
Carl
13 Posts
Posted Jan 27, 2013
Replied 6 months later
What about... Reflection Gel?

Currently the Sendificator stops when it gets to a surface with Reflection Gel even though the laser reflects and keeps going. Does anyone have any ideas for detecting the reflected laser?

Avatar
FelixGriffin
2,680 Posts
Posted Jan 27, 2013
Replied 43 minutes later
Unfortunately the gel detection is hard-coded into the laser entity. The only way to make it reflect from reflection gel would be to use a special dropper, then put a gel-bomb-detector with its own script on each surface the player might put the gel on.

That's how Omnicoder got the adhesion gel working, and also why he didn't use it in anything except a simple hollow rectangle.

Unless, of course, the gel were placed beforehand on special panels. Less of a gel, more of a mirror. That would be usable, at least in theory. Now I have to go test this...

Avatar
HMW
806 Posts
Posted Jan 29, 2013
Replied 1 day later
Mirrors would be neat. It's one of the things I'm considering for later levels in the series.
Avatar
krishiv2
23 Posts
Posted Jul 20, 2013
Replied 5 months later
I want the sendificate series to be uploaded in this website instead of uploading to steam because I don't have steam account.
Avatar
FelixGriffin
2,680 Posts
Posted Jul 20, 2013
Replied 12 hours later
If you don't have a Steam account you don't have a legal copy of Portal 2.

I'm going to give you the benefit of the doubt and hope that something was just lost in translation here.

Advertisement
Registered users don't see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Jul 21, 2013
Replied 12 hours later
I hope this isn't an indication of piracy. Because otherwise there will have repercussions.