Scripting and parenting

Avatar
Fracture
797 Posts
Posted Mar 20, 2012
will someone tell me how to script-parent a light bridge to a brush? I know nothing of script. It hurts my brain trying to learn it
Advertisement
Registered users don’t see ads! Register now!
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 20, 2012
Replied 50 minutes later
EDITED since this comment was no longer required.

Ontopic:
No need for scripting; just use triggers ontrigger hardlightbridge, SetParent, Brushname should work.
the hard light bridge needs to be out while moving or it will stay at its original position!

Avatar
spongylover123
944 Posts
Posted Mar 20, 2012
Replied 6 hours later
There are levels of a game.
The levels are:
Texturing
Mapping
Modeling
Coding/Scripting

You're aiming too high, just try the easiest methods you can find and or do.
And I recommend just doing lp's method or just use the parent param.

Avatar
Kaleido
272 Posts
Posted Mar 20, 2012
Replied 32 minutes later
I agree with LP; tumor jokes are not funny =\

Also, Portal 2's "scripting" is remarkably easy and powerful... I can't imagine what would happen to you physically if you actually had to write code.

Avatar
Fracture
797 Posts
Posted Mar 20, 2012
Replied 4 minutes later

lpfreaky90 wrote:
No need to mention tumors since they can be really bad for people and people can get offended by such titles. So please keep that in mind next time.

Ontopic:
No need for scripting; just use triggers ontrigger hardlightbridge, SetParent, Brushname should work.
the hard light bridge needs to be out while moving or it will stay at its original position!

sorry, I am still one of those people that takes a LOT to get offended.

I tried parenting the bridge, but the setparent option wasn't even there. I entered it in anyway. Now what did you mean by it having to be out while moving? what does that even mean? outside the parent object physically?

Avatar
iWork925
1,080 Posts
Posted Mar 20, 2012
Replied 24 minutes later

Fracture wrote:
sorry, I am still one of those people that takes a LOT to get offended.

:wink: Challenge accepted.

Avatar
ChickenMobile
2,460 Posts
Posted Mar 20, 2012
Replied 54 minutes later
You can add the parentname keyvalue manually into the lightbridge by turning off smartedit and creating a new key. The only problem with lightbridges is that whenever the lightbridge is on, the lightbridge beam will not follow with the lightbridge model. Therefore you have to disable the lightbridge when it is moving and re-enable it when it isn't.
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 20, 2012
Replied 9 minutes later

spongylover123 wrote:
There are levels of a game.
The levels are:
Texturing
Mapping
Modeling
Coding/Scripting

You're aiming too high, just try the easiest methods you can find and or do.
And I recommend just doing lp's method or just use the parent param.

I believe the hard light bridge entity doesn't have a parent entity. but just using a logic auto or logic relay should do.

On the original title thing again
||it isn't really offensive but a lot of people die because of cancer; which also consist of a lot of tumors. For example a couple of weeks ago a friend of my brother died of a rare case of cancer. She was 22 years old. Seeing cancer, tumors all over the place can be really confrontational to people, specially to people who've just a dear one to this horrible disease.

During my normal life I am studying molecular life sciences and part of that is also searching why cancer develops. For me this is a very interesting topic but I've noticed before that I became "enthusiastic" about how cancer works. From my experience I know people can really get upset by it so you didn't insult me in any way. It's just something to be careful about :wink:||

Avatar
Fracture
797 Posts
Posted Mar 21, 2012
Replied 14 hours later
I got it working just as i need it to. I wonder if this works for all entities? I have lights that don't seem to cover all surfaces as they should be doing. I got moving rooms that are not properly lit when they stop moving
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 21, 2012
Replied 24 minutes later

Fracture wrote:
I got it working just as i need it to. I wonder if this works for all entities? I have lights that don't seem to cover all surfaces as they should be doing. I got moving rooms that are not properly lit when they stop moving

No; that is one problem with the source engine: Lights are calculated by vvis during compiling and they are static. So this gives problems. The only light source that is an exception is an env_projected_texture but you can only use one at a time.

Avatar
Fracture
797 Posts
Posted Mar 21, 2012
Replied 3 hours later
that is ultra lame.

weird thing happened, though. I increased the settings of several light_spots to keep a room well lit, while placing another light somewhere they wouldn't be entirely noticed, and moved a room to its exact location. Somehow the light_spots actually pierced through the surfaces and lit up the other room twice as bright as needed.

Avatar
Spam Nugget
492 Posts
Posted Mar 22, 2012
Replied 12 hours later
It may be 'ultra lame' but it makes performance 800 bazillion times better than using purely dynamic lighting, which is why its done this way.
Avatar
Fracture
797 Posts
Posted Mar 22, 2012
Replied 15 hours later
well i only got light, and light spot. it's my guess wheatly's flash light from that one chapter is the one only parentable light?
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 22, 2012
Replied 52 minutes later

Fracture wrote:
well i only got light, and light spot. it's my guess wheatly's flash light from that one chapter is the one only parentable light?

Yes; all flashlights in all sourcegames are env_projected textures:)

Avatar
Spam Nugget
492 Posts
Posted Mar 23, 2012
Replied 6 hours later
You can also use light_dynamic, not exactly sure what the difference between that and env_projected_texture is though.

Also and completely off topic, since when are you a moderator lpfreaky?

Avatar
HammerHead
42 Posts
Posted Mar 23, 2012
Replied 13 hours later
I'm building a coop map right now that uses a light bridge though a portal on a moving surface to create a lift. It's crazy the result that you get doing that. The floor is essentially turning on and off repeatedly so the player glitches while it moves. Eventually I made a fake light bridge and used portal detectors to activate it. Has anyone tried using world portals to make a light bridge portable?
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 23, 2012
Replied 2 hours later

HammerHead wrote:
I'm building a coop map right now that uses a light bridge though a portal on a moving surface to create a lift. It's crazy the result that you get doing that. The floor is essentially turning on and off repeatedly so the player glitches while it moves. Eventually I made a fake light bridge and used portal detectors to activate it. Has anyone tried using world portals to make a light bridge portable?

I wouldn't suggest using worldportals for this. They are known for their glitchy behavior. Usually the easier solution is the best:
1) can't you replace the moving panel by a white wall where a person can re-portal to get higherup?

2) can't you replace the hard light bridge by a funnel? Often this works and you can use the funnel as an elevator as well! (either placing a portal on the floor or re-portalling.)

Avatar
HammerHead
42 Posts
Posted Mar 23, 2012
Replied 3 hours later

Quote:
1) can't you replace the moving panel by a white wall where a person can re-portal to get higherup?

2) can't you replace the hard light bridge by a funnel? Often this works and you can use the funnel as an elevator as well! (either placing a portal on the floor or re-portalling.)

Well yes I suppose I could. I just really liked the idea of doing something that isn't normally allowed by the game. As of now using brushes that enable when portals are open in front of the emitter and the wall works just fine. Plus seeing the world stay still behind your portal while you move is just too cool to give up.

Avatar
BenVlodgi
633 Posts
Posted Mar 24, 2012
Replied 2 hours later

HammerHead wrote:
Quote:

1) can't you replace the moving panel by a white wall where a person can re-portal to get higherup?

2) can't you replace the hard light bridge by a funnel? Often this works and you can use the funnel as an elevator as well! (either placing a portal on the floor or re-portalling.)

Well yes I suppose I could. I just really liked the idea of doing something that isn't normally allowed by the game. As of now using brushes that enable when portals are open in front of the emitter and the wall works just fine. Plus seeing the world stay still behind your portal while you move is just too cool to give up.

There is a reason that certain things aren't being done.... because their bad
for-instance, there was a time when I was focusing on back-stock having a lot of gravity changing chambers, there was going to be rotating gravity... I got it to work, but it was glitchy, and eventually I said it wasn't worth it

Advertisement
Registered users don’t see ads! Register now!
Avatar
HammerHead
42 Posts
Posted Mar 24, 2012
Replied 12 hours later

Quote:
There is a reason that certain things aren't being done.... because their bad
for-instance, there was a time when I was focusing on back-stock having a lot of gravity changing chambers, there was going to be rotating gravity... I got it to work, but it was glitchy, and eventually I said it wasn't worth it

Yea you're right it's definitely glitchy but I was just toying with the idea. If I can get it stable enough to use without questioning it then I'll release it but if not I'll just swap it for a portalable wall. Either way there is the benefit of learning new entities, mechanics, and techniques for future puzzles.

Also @ Fracture
Here's a great tutorial about editing your fgds to have certain keyvalues without having to add them every time http://www.youtube.com/watch?v=6oJeBUu9q24