Elevator lighting

Elevator lighting

Postby Theevina » Wed Nov 21, 2012 1:10 pm

Hi, I'm making a mod where the first tests are made with PTI and then modified and optimized heavily with Hammer. It seems to work nicely for me. I stripped out a lot of stuff I didn't need and replaced the elevators.

But why are the elevator rooms so dark? All of the monitors are black and there's hardly any lighting in the room. Before you ask I did set the videos in the arrival_departure_transition_ents instance to "media/laser_danger_horiz.bik" and "media/plc_blue_horiz.bik" which don't seem to work.

(And as a bonus, can someone tell me how to turn on the lights in the PTI large observation room? I tried observationroom4 → instance:relay_lights_on;Trigger but it didn't work.)
Theevina
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Nov 28, 2011

Registered users don't see ads! Register now!
 

Re: Elevator lighting

Postby josepezdj » Wed Nov 21, 2012 5:39 pm

First of all, there are many things happening there.

The videos are shown up the way they do because of a script. That script was substituted by another one in DLC2 release and it seems to be broken. Only PTI maps videos work fine.

Anyway, you're lucky because Brainstone made some awesome instances for you. Check this post.

About the lightng, you should have an env_projectedtexture in the arrival/departure logic instances (search near the elevator prop itself :wink:)... You can only have one of these entities active at a time (your observation rooms surely have another of these entities) so you should know their names and fire outputs "TurnOn" to each one you want active as the player walks through the map... Ofc you have many other resources to light up your observation rooms, your elevators or your map... Check the light entities' flags because many of them could be set to 'Start Off' (or 'Initially dark' :wink:)
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby Theevina » Wed Nov 21, 2012 10:08 pm

Sorry for being a little confused. The new instances look like they are for actual PTI maps. I'm not uploading it to the workshop and I swapped out the elevator instances for the normal Portal 2 ones. So if the problem is because of the instance, then wouldn't all the Portal 2 elevator videos be broken?
Theevina
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Nov 28, 2011

Re: Elevator lighting

Postby josepezdj » Thu Nov 22, 2012 4:28 am

Theevina wrote:
So if the problem is because of the instance, then wouldn't all the Portal 2 elevator videos be broken?
I told you, the problem is not the instances, it is a script that Valve modified... I guess Brainstone found any kind of fix to how the videos are managed by this script and introduced some changes to amend Valve's mistake... I'm not using these elevators so I can't tell where the fix is :D (pm Brainstone if you are interested)

Have you tried them? Did you test and watch the videos?
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby ChickenMobile » Thu Nov 22, 2012 9:12 pm

josepezdj wrote:
Theevina wrote:
So if the problem is because of the instance, then wouldn't all the Portal 2 elevator videos be broken?
I told you, the problem is not the instances, it is a script that Valve modified...
The script they modified will pick a random video, even if you specify it in the instance.

Brainstone's instance is great, however it will only stretch the monitor video one way because of the inputs he put on the videos to get them to stretch and tile correctly.

On the note of the observation room: you can directly access entities by putting the prefix of the instance and the name of the entity originally in the instance in an output.
e.g. Instance is called observationroom4, projectedtexture inside instance is called project1. You can activate the projected texture by putting observationroom4-project1 -> TurnOn.
                             TWP Releases | My Workshop
User avatar
ChickenMobile
Senior Stalemate Associate
 
Posts: 2,470
Joined: May 9, 2011
Location: Canberra, Australia

Re: Elevator lighting

Postby Theevina » Fri Nov 23, 2012 2:19 am

It's not that a random video plays but the monitors are all black and the rooms are dark.

Plus I've tried both methods to trigger the observation room, the room -> instance:relay;Trigger and the room-relay -> trigger but neither work.

I hate instances and maybe I'm doing something entirely wrong. Can someone look at the map so that they can see what I mean? I'll replace the elevator instances if that is really the source of the video problem but the projected texture problem bothers me the most.
Attachments
sp_aperturesecret1.vmf
(214.3 KiB) Downloaded 112 times
Theevina
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Nov 28, 2011

Re: Elevator lighting

Postby josepezdj » Fri Nov 23, 2012 4:28 am

I can't check your map right now because I'm not at my computer, sorry... if no one helps you out in the meantime, I'll check it later at home.

About instances, you shouldn't hate them because they are extremely helpfufl, overall if you are making a mod: you can set them up and then add them in every map of your mod withouit remaking them once and again for each level; and any change you introduce into them will be present into each of your maps. Also, an advanced use of instances allows you to have variables that you can set up in the instance's properties dialog box each time you use them, but with all possible happenings packed into the instance... like the cube_droppers for example, and this is awesome.

There is one thing that can help if you really don't want to deal wit instances: collapse them:
1. Select the entity (/ies) you want to collapse
2. Go to Tools > Instancing > collapse > Selection

But I strongly recommend you not to do, you can just edit them: open the instance's properties dialog box and head to the left bottom corner where it says "Edit Instance" and click it. Now you are into the instance. First thing I recommend you to do is to save it under a different name to keep Valve's instances intact. Now just mess around and check each entity into the instance. Check their names and I/O to find out how they work. This way you can search for any possible logic_relay not being triggered and causing your lack of lighting in the elevator for example.

Normally the elevators have an env_projectedtexture parented to the elevator prop that lights up your way to the elevator shaft. But there are also several light_spot and light entities. Some of them are named and they're set to start initially dark (check their flags) to be later turned on by means of logic_relays. Here you can change whatever to set it up your way anad to control the name and I/O of each entity (be sure of what you do in order not to cause more bad than good :D). However, I think there must be a trigger brush right where the elevator prop is that turns the lights on as soon as the player is spawn in there and he triggers it.

In order to trigger a logic_relay inside an instance, apart from the method Chicken said above, you can also add an "@" prefix to the name of the entity inside the instance. Say for example that you have a logic_relay that turns your projectedtexture and some other lights on called "relay_lights_on", well, just name it "@relay_lights_on" (again, check its inputs/outputs in order to not cut any connection it has to other entities into the instance, ok?). Now you can trigger that relay from outside the instance if you want including in your output: Target entity name "@relay_lights_on" > Trigger

I hope this helps you somehow
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby zivi7 » Fri Nov 23, 2012 6:39 am

If I remember correctly the videos in the standard PTI-elevator will only show when the map is uploaded to the workshop. When testing locally, the screens stay black.
User avatar
zivi7
Community Contributor
 
Posts: 632
Joined: Mar 8, 2012
Location: Germany

Re: Elevator lighting

Postby josepezdj » Fri Nov 23, 2012 7:53 am

zivi7 wrote:
If I remember correctly the videos in the standard PTI-elevator will only show when the map is uploaded to the workshop. When testing locally, the screens stay black.
Hmmm... really? That is a good information zivi :thumbup: That explains many things... I had no doubt though regarding the videos, I know they work for the PTI maps because of that script modified with the DLC2
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby Theevina » Fri Nov 23, 2012 1:18 pm

zivi7 wrote:
If I remember correctly the videos in the standard PTI-elevator will only show when the map is uploaded to the workshop. When testing locally, the screens stay black.


Except I'm not using the PTI elevator. I said I replaced all of those instances except for the observation room and some buttons.

Has anyone looked at the map yet to confirm that the I/O isn't working to turn on the observation room light?
Theevina
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Nov 28, 2011

Re: Elevator lighting

Postby zivi7 » Fri Nov 23, 2012 2:29 pm

I meant to say: upload the map to the workshop, subscribe, see if the videos are still black. Some things won't work locally but only on the workshop (Cave Johnson speaking or intentionally not speaking for example).
User avatar
zivi7
Community Contributor
 
Posts: 632
Joined: Mar 8, 2012
Location: Germany

Re: Elevator lighting

Postby josepezdj » Fri Nov 23, 2012 2:48 pm

OK, I checked your map. First of all, I asked you before to check out into the instances, to check for the logic_relay that surely activated the light obs_room, check about the "@" prefix in its name and trigger it, but I think you didn't do at all. I don't like to write such a lecture and to have a feeling that the OP didn't even try anything suggested or put interest in solving his/her own issue... but still:

1. There IS a logic_relay into your obs_room called "@relay_lights_on". I took that trigger brush in your map's entry and correct your output for this one:

- OnTrigger > "@relay_lights_on" > Trigger.

So your obs_room lights work out now. :thumbup:

2. About the elevator, the env_projectedtexture works fine, but the videos don't. You are seeing that black tiles because they don't even turn on. I tell you again: it is because of the script. Valve released a new script "video_splitter.nut" with their DLC2. It's located into portal 2/portal2_dlc2/scrips/vscripts/videos folder, and it has priority over the old ones overriding them...

My fix:

As I know that the old script works fine, all I did was to take it from portal 2/portal2/scripts/vscripts/videos folder, and in order to make it work, it's important to give it a different name and place it in a different location than it is now. I named it "jose_video_splitter.nut" and located into a new folder I made: "portal 2/portal2/scripts/vscripts/josepezdj"

Now, again, you have to go into the instance as I told you before (it's the "arrival_elevator_logic4") by clicking "Edit Instance". Locate the logic_script entity that manages this script (it's on the playerclip textured brush) and tell it to use your brand new script called "jose_video_splitter.nut" into /josepezdj folder... am I explaining clearly? :wink:

So your videos show up now. :thumbup:

Proof:



It is important that you understand what I just did in order to do it yourself. But anyway, I'm attaching your map modified and the arrival_elevator_logic instance modified, and even the script with different name (place it where I said above). Would you try to manage yourself to make the videos to work for the departure elevator? :wink: I know you will :thumbup:
Attachments
Theevina.7z
(620.91 KiB) Downloaded 121 times
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby Theevina » Fri Nov 23, 2012 5:02 pm

josepezdj, thanks for your patience and help, but please let me explain myself.

I'm not lazy or not trying to fix my own problems. I've been doing Source mapping for a year now but instances have been impossible for me to understand. Every time I come back to Portal 2 I rage quit within days. I don't know if the wiki articles I was reading were poorly written or whatever but eventually I got too frustrated and needed to have someone personally show me an example in my map to understand the whole thing. I didn't know what they meant by the "@" pointing to the entity directly but now I get it. (Oh, and I'm a male. :D)
Theevina
I was told I would get $60 if I posted on the forum
 
Posts: 20
Joined: Nov 28, 2011

Re: Elevator lighting

Postby josepezdj » Fri Nov 23, 2012 5:18 pm

It's ok dude. I like to help, but maybe it's just that I sometimes lose my patience :D

One thing more I forgot: you should pakrat the script into the .bsp in order to make it work for other ppl, ok? And do not forget to correct its path once into the bsp with pakrat. :wink:

I hope that you let me know if you finally get the deparutre elevator videos to work :thumbup:
ImageImageImageImageImage
useful tools and stuff here on TWP :thumbup: |
ImageImageImageImageImage
User avatar
josepezdj
Olympian and/or War Hero
 
Posts: 2,357
Joined: May 8, 2011
Location: Spain

Re: Elevator lighting

Postby backzpace » Sat Feb 02, 2013 3:50 pm

@josepezdj Amazing fix here, very detailed and worked right off the bat. Cheers!
User avatar
backzpace
I was told I would get $60 if I posted on the forum
 
Posts: 5
Joined: Jan 14, 2013

Registered users don't see ads! Register now!
 
Next

Return to Hammer and Modding



Who is online

Users browsing this forum: No registered users and 5 guests

cron

Search the Forums

User Menu

Register
Login

Login