[SP] Sendificate
Quote from That Greek Guy on May 22, 2012, 12:38 pmwill you upload the instance of the sending device somewhere for others to use?
It could really brin some very original maps.
will you upload the instance of the sending device somewhere for others to use?
It could really brin some very original maps.
Quote from HMW on May 22, 2012, 3:23 pmOh crap, I forgot that the readme file is of course no longer available with the workshop version. That contained the link to the source files.
Here it is:
http://dl.dropbox.com/u/51831059/Portal ... _v3_src.7z
Licence: http://creativecommons.org/licenses/by/3.0/It's slightly out of date; with this version you have to do a lot of special stuff to handle glass correctly. The version I currently have, handles glass automatically. I'll update the source archive when I have some time, and put this link in the workshop description.
Oh crap, I forgot that the readme file is of course no longer available with the workshop version. That contained the link to the source files.
Here it is:
http://dl.dropbox.com/u/51831059/Portal ... _v3_src.7z
Licence: http://creativecommons.org/licenses/by/3.0/
It's slightly out of date; with this version you have to do a lot of special stuff to handle glass correctly. The version I currently have, handles glass automatically. I'll update the source archive when I have some time, and put this link in the workshop description.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from That Greek Guy on May 22, 2012, 7:29 pmThanks a lot.
This is gonna be awesome.
I am making a new facility like aperture and i need some new elements and this is just perfect.
Thanks a lot.
This is gonna be awesome.
I am making a new facility like aperture and i need some new elements and this is just perfect.
Quote from Groxkiller585 on June 3, 2012, 12:55 pmJust thought i'd let you know:
I tried loading up the test map, and when I compiled (without edits) the sendificators did not work. (that or the buttons are not working) There was no script error in the console, so I am not sure what went wrong.
EDIT: Ignore the above, it's me being stupid: I collapsed the instances by accident.
Also I'd like to ask two things:
1. Can I use this in one of my maps as-is (ie add a sendificator to the map)?
2. Can I edit this to do something similar?
You would ofc get full credit for the script.
Just thought i'd let you know:
I tried loading up the test map, and when I compiled (without edits) the sendificators did not work. (that or the buttons are not working) There was no script error in the console, so I am not sure what went wrong.
EDIT: Ignore the above, it's me being stupid: I collapsed the instances by accident.
Also I'd like to ask two things:
1. Can I use this in one of my maps as-is (ie add a sendificator to the map)?
2. Can I edit this to do something similar?
You would ofc get full credit for the script.

Quote from HMW on June 3, 2012, 3:15 pmAnswer to both 1 and 2: yes!
I have still not found the time to update the source archive with my current version, which removes the awkward workaround for windows. (Or rather: I completely forgot about it.) I'll do my best to make some time for that next week, because it would be awesome to see this used in more maps!
(The interface will not change; updating is just a matter of dropping in new instances + script and re-compiling.)
Answer to both 1 and 2: yes!
I have still not found the time to update the source archive with my current version, which removes the awkward workaround for windows. (Or rather: I completely forgot about it.) I'll do my best to make some time for that next week, because it would be awesome to see this used in more maps!
(The interface will not change; updating is just a matter of dropping in new instances + script and re-compiling.)
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Groxkiller585 on June 3, 2012, 8:29 pmHMW wrote:Answer to both 1 and 2: yes!I have still not found the time to update the source archive with my current version, which removes the awkward workaround for windows. (Or rather: I completely forgot about it.) I'll do my best to make some time for that next week, because it would be awesome to see this used in more maps!
(The interface will not change; updating is just a matter of dropping in new instances + script and re-compiling.)
Thank you! I'll make sure you receive credit.
EDIT: One last question: Does this work in Coop?
EDIT2: The anwser is both yes and no. It does it's job, but it does not go through portals (probably too many to account for, maybe you need two portal detectors, one for each portal pair?)
I have still not found the time to update the source archive with my current version, which removes the awkward workaround for windows. (Or rather: I completely forgot about it.) I'll do my best to make some time for that next week, because it would be awesome to see this used in more maps!
(The interface will not change; updating is just a matter of dropping in new instances + script and re-compiling.)
Thank you! I'll make sure you receive credit.
EDIT: One last question: Does this work in Coop?
EDIT2: The anwser is both yes and no. It does it's job, but it does not go through portals (probably too many to account for, maybe you need two portal detectors, one for each portal pair?)

Quote from HMW on June 4, 2012, 4:07 pmI haven't tested coop yet. (Heck, I haven't ever played coop yet in any meaningful way.)
The current code assumes 2 portals max, which makes things easy since when the tracing code detects a portal, it just looks up the other portal that it isn't detecting and continues from there.
Having two portal detectors seems like a good way to go about it. Perhaps we can have each detector set the "sendtor_active" variable to a different value, to tell them apart. (Instead of just true/false, have it be 0 = off, 1 = ballbot portal, 2 = eggbot portal. Something like that.)
I'll have to experiment a bit, but as I said, I don't have much experience with coop. If you would like to tinker around with it yourself, go right ahead!
I haven't tested coop yet. (Heck, I haven't ever played coop yet in any meaningful way.)
The current code assumes 2 portals max, which makes things easy since when the tracing code detects a portal, it just looks up the other portal that it isn't detecting and continues from there.
Having two portal detectors seems like a good way to go about it. Perhaps we can have each detector set the "sendtor_active" variable to a different value, to tell them apart. (Instead of just true/false, have it be 0 = off, 1 = ballbot portal, 2 = eggbot portal. Something like that.)
I'll have to experiment a bit, but as I said, I don't have much experience with coop. If you would like to tinker around with it yourself, go right ahead!
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Groxkiller585 on June 4, 2012, 4:08 pmEDIT: Whoops, hit quote then post too quickly.
Anyway i'm having headway intomaking it coop-compatible.
What you WILL need to do, on your end if you want this to be coop-compatible as well as sp, is open every instance with a "logic_auto" in it, and copy the I/O again but now have it be "OnMultiNewMap" instead of "OnMapSpawn". "OnMapSpawn" is not called in coop, the other output is. This won't affect sp at all, and make it work in coop. (You need some script edits too but i'm working on that.)
(For the record, Chell's portal ID (0) is NOT Altas's ID. This caused me some initial confusion. Atlas's ID is 1, and P-Body's is 2.)
EDIT: Whoops, hit quote then post too quickly.
Anyway i'm having headway intomaking it coop-compatible.
What you WILL need to do, on your end if you want this to be coop-compatible as well as sp, is open every instance with a "logic_auto" in it, and copy the I/O again but now have it be "OnMultiNewMap" instead of "OnMapSpawn". "OnMapSpawn" is not called in coop, the other output is. This won't affect sp at all, and make it work in coop. (You need some script edits too but i'm working on that.)
(For the record, Chell's portal ID (0) is NOT Altas's ID. This caused me some initial confusion. Atlas's ID is 1, and P-Body's is 2.)

Quote from Groxkiller585 on June 4, 2012, 11:54 pmSorry for double post but:
I got it working! (Ignore the missing machine/laser, I was breaking down how you did things and accidentally saved.)
To get around which portal was which I cheated: I named all the coop portals in an instance and just loaded them into an array. There's probably a better way, but I don't know if you can get the linkage ID from a portal.
Granted this is ss_map, not real coop, but I think it will work there too.
I need to steamroll a few things before I upload here for you, but it's working!
Sorry for double post but:
I got it working! (Ignore the missing machine/laser, I was breaking down how you did things and accidentally saved.)
To get around which portal was which I cheated: I named all the coop portals in an instance and just loaded them into an array. There's probably a better way, but I don't know if you can get the linkage ID from a portal.
Granted this is ss_map, not real coop, but I think it will work there too.
I need to steamroll a few things before I upload here for you, but it's working!

Quote from HMW on June 5, 2012, 2:47 pmWow, 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!
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!
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic