PDA

View Full Version : A Fairly Complex Piece of Logic That Could Potentially Make Levels More Realistic.



travis54449
08-09-2010, 06:56 AM
it is simply (not really) a piece of logic that simulates changing from day to night and then back infinitely. What makes this so unique is that I have made it able to control lights, doors and music based on if it is day or night, and to top it off i made it easy to start and stop as well as added in 4 'pause/resume' switch groups that allow you to create areas where time will stand still.

I have also made a tutorial explaing how to use as well as recieve the logic which I have named Travis54449's Sun Cycle Simulator :) (will add pictures if i can manage to do so on the PS3's shameful browser)

huntedstorm
08-09-2010, 08:34 AM
cool, I'll check it out right now...

Edit: Okay, just checked it out, and you got a pretty big peice of logic there my friend, i don't really know what to think of it, good, and works well with the level as an example. I found it quite interesting to study all the logic and the fact you can change music changing was nice touch, although it should of goten alot darker at night time.

travis54449
08-09-2010, 03:23 PM
I only made it go as dark as it did because I find it to be too thermo consuming to add a ton of lighting that isnt needed with the lighting that its currently set at and as a positive, since I made it user friendly it can easily be made darker by just editing the lighting switch :)

Luos_83
08-09-2010, 04:40 PM
I got one that not only controls the day and night, but also the lighting inside houses, flames, candles, sunrays and has options to not interfear with location-based globals (i.e. caves).
And, has a few switches ready to work with rain/snow/lightning.

so.. whats so special about this one if I may ask?

travis54449
08-09-2010, 07:08 PM
mine is set up to switch music as well as has the ability to controll the direction of objects based on the time of day and my lights have a fade effect that makes them turn on and off more elegantly :) You'd probably be best off checking out the level I put it in to see it in its full form.

Holguin86
08-10-2010, 12:53 AM
Pretty neat, but you've much overcomplicated your logic. What you need is a Mutual Exclusion switch. You can pick one up in Incinerator22's new logic workshop if you don't want to build it yourself, but here's the premise:

You'll need to make one of these:

http://img408.imageshack.us/img408/511/aphoto1.jpg

It's a piece of dissolve with a green key and a green switch, with a radius tweaked as shown. The switch is then wired to the dissolve.

http://img825.imageshack.us/img825/6103/aphoto2.jpg

Place this object in an emitter and copy the emitter 4 times. Set the object to emit directly above each emitter. The grid is your friend. The magnetic key switches on the top row correspond to the connectors that move your main platform up and down. The bottom magnetic key switch controls the stairs pointing to the left or right, and it is tweaked to trigger when the object/key is directly above either of the two switches above it.

The emitters take inputs from each of your switches, which are one-shot. They do, however, need to be in a funky order because of the bottom mag key switch. From left to right, they take inputs from 4, 2, 3, 1 (where 4 = top, 1 = bottom). This is because the stairs need to point right when at locations 2 and 4.

I'm not sure how you were moving the main material piece that supports the stairs, but I used a Variable Length Piston (http://www.lbpcentral.com/forums/showthread.php?16124-Variable-Length-Pistons-(Stops-at-different-locations)&highlight=variable+length+pistons) technique.

http://img828.imageshack.us/img828/2976/aphoto.jpg

When the object/key emits, it should look as such. If you trigger the emitter for another "level" it will destroy the previously emitted key, thereby making it mutually exclusive.

Benefits:
Resets to any floor, not just the first.
More thermo efficient.
Simpler.
Easily expandable.

I hope this makes sense. I can't be bothered to make a video from my old digital camera.

:)

I think this would help, a solution to a staircase problem but still applicable here (thanks comphy :p). You would use a mutual exclusion switch to switch between as many different GLTs as you wanted, using directional inputs for pistons to control light fading. Obviously if you were switching between day and night, all you'd need is your bog-standard set-reset switch. Nothing fancy in that, huh?

travis54449
08-10-2010, 03:11 AM
While that may be useful to reduce the complexity(and size) of my logic, Im not sure it would be very helpful for me in this piece of logic, as my current design allows for less skilled as well as skilled creators to reap preferable rewards from the switch due to its being easy to decipher what each part of the switch does, as well as the fact that I'm not fully sure how I could go about setting the length of a day as I am currently able to do.

Holguin86
08-10-2010, 07:42 AM
Obviously stick with what you find comfortable, there's nothing worse than looking at some logic and not knowing what it does, especially if you're not that confident with logic in the first place. :p

AssassinatorRFC
08-15-2010, 12:22 AM
I think this would help, a solution to a staircase problem but still applicable here (thanks comphy :p). You would use a mutual exclusion switch to switch between as many different GLTs as you wanted, using directional inputs for pistons to control light fading. Obviously if you were switching between day and night, all you'd need is your bog-standard set-reset switch. Nothing fancy in that, huh?

Haha a solution to my staircase problem :p

About the night and day cycle I have made one for a couple of levels and I am toying around with the Idea of making a randomiser make weather fronts such as rain and thnderstorms.