Simplifing Some Logic

Avatar
Dr. Glaze
4 Posts
Posted Mar 10, 2008
Hello there.

I am currently working on a map with a friend and was coding a move away floor over slime/fire. I have the challenge working but with many changes to items I didn't like.

When I had to make the solution, I first set it up similar to that of a prefab (redone by me to understand its mechanics.)I tried to use, The User1-4 outputs, for the challenge. After testing there appeared to be bugs using those. I also thought they may come back to haunt me again if I used the same kind of outputs later.

The solution I then tried was adding more "relay_logic" entities to the map but after that I have a total of 9.

Sure that doesn't seem like much but that was only one room. I'm wondering if 9 relay logics are normal for a single room of a much larger test or there is a way to simplify this into at least 4-5 "logic_relay's" without use of any "user1-4" outputs.

Also as a side question: How does one set up the fire entity to ignite by itself?

Advertisement
Registered users don't see ads! Register now!
Avatar
msleeper
4,095 Posts
Admin
Posted Mar 10, 2008
Replied 39 minutes later
Uh, if you are asking if having an abundance of logic_relay's is a bad thing, than no. It may be possible to combine them, but without either seeing your map and/or having the VMF, it's hard to be certain. 9 of them is not bad at all.
Avatar
Dr. Glaze
4 Posts
Posted Mar 10, 2008
Replied 37 minutes later
Ahh. Okay. I think that I can combine some of them and maybe get some load of the counter entity if that's the case.

Can you just help me figure out the second problem? I tried the flags in the fire entity and get nothing. What settings would you think create fire?

Avatar
msleeper
4,095 Posts
Admin
Posted Mar 10, 2008
Replied 29 minutes later
You need to have something else send the Ignite (or maybe Activate) I/O to it, like a trigger or a logic_relay.
Avatar
Dr. Glaze
4 Posts
Posted Mar 10, 2008
Replied 35 minutes later
I will try the trigger right away. Thanks.
Avatar
NykO18
183 Posts
Posted Mar 11, 2008
Replied 5 hours later
logic_relays allows mappers to script their events in a basic "object-oriented" style. Each logic_relay should handle a specific task that could be repeated independently. At no point a single logic_relay should handle a very long and complicated serie of outputs. It's way more difficult to create and maintain (because the output view of entities is not really appropriated for a large quantity of outputs) and it's also way more difficult to debug.
You still have some time before you could have a problem with input/output overflow. One day, I made an "amusement park" for Half-Life 2: Deathmatch, there was attractions moving everywhere, things spinning, things making smoke, musics and sounds playing, lights and sprites were flickering all the way out, and THERE I had a problem with input/output overflow. But there was like 40 or 50 outputs sent per second. So... don't be so anxious. The more the better.
Avatar
Ricotez
738 Posts
Posted Mar 11, 2008
Replied 7 hours later
Even though some calculation power is put in the I/O system, that's nothing compared to the ammount of power put in the rendering system. Of course, that doesn't mean you have to overdo it. But personally, I like logic systems more than enviroments. That's why I enjoy mapping for Portal so much.
Avatar
Dr. Glaze
4 Posts
Posted Mar 11, 2008
Replied 3 hours later
Thanks a lot everyone. After finding out that more logic_relays are beneficial I was able to fix some of the coding and now have the map working way better than before. Including such the jobs of the User1-4 have been given to 4 new logic_relays. Thanks for the assistance.
Avatar
msleeper
4,095 Posts
Admin
Posted Mar 11, 2008
Replied 14 minutes later
The User1-4 I/Os are in my opinion generally worthless. I can not think of a single instance where they would be useful to use.
Avatar
Ricotez
738 Posts
Posted Mar 11, 2008
Replied 32 minutes later
I know one: when you want a env_texturetoggle to, next to change the texture of something, toggle the state of a logic_branch on the pressing of certain buttons.

I've made a rather complex logic system for the map I'm currently working on. It features the "nine rooms which must all be made lit"-riddle and it works fine, as far as I know without any bugs, thanks to the user input. I'm pretty sure there are other ways, but sometimes, the user inputs is a great way to do things.

Avatar
NykO18
183 Posts
Posted Mar 11, 2008
Replied 1 hour later

msleeper wrote:
The User1-4 I/Os are in my opinion generally worthless. I can not think of a single instance where they would be useful to use.

http://developer.valvesoftware.com/wiki/User_Inputs_and_Outputs

Avatar
msleeper
4,095 Posts
Admin
Posted Mar 11, 2008
Replied 2 hours later

NykO18 wrote:
http://developer.valvesoftware.com/wiki/User_Inputs_and_Outputs

Well played.

Avatar
Nameless
34 Posts
Posted Mar 13, 2008
Replied 1 day later

Ricotez wrote:
"nine rooms which must all be made lit"

I bet i know what puzzle that is :p (Lights out on a 3x3 grid)

I was going to make a puzzle like that but i have been using alot of logic branches and listeners which imitate conditional statements. Are logic branch listeners the best way to go for making complex logic puzzles?

Avatar
msleeper
4,095 Posts
Admin
Posted Mar 13, 2008
Replied 58 minutes later

Kinda, Hurricaaane made a pretty sweet article on the Wiki about logic puzzles and how to use the various logic entities to the best of their abilities.

http://wiki.thinkingwithportals.com/wik ... tals_Items

Advertisement
Registered users don't see ads! Register now!
Avatar
Ricotez
738 Posts
Posted Mar 14, 2008
Replied 16 hours later
Hmm, maybe I should make something compareable for the "Lights out on a 3x3 grid"-puzzle... once I got the map finished. Don't want anyone to steal it prematurely, of course.