Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Player Sensor...need a "trip wire"

Archive: 22 posts


Hey all!

I'm making a level where I want a series of emitters to turn on when the players drop down through a vertical shaft. I've tried using the player sensor attached to the wall of the drop but it seems to just flick the emitters ON then OFF when the players fall out of range.

All I want is for the emitters to turn on when all the players enter the area. Is there an easy solution for this?

Thanks!
2011-04-03 18:59:00

Author:
Unknown User


You can wire the sensor to a counter set to one, when the sensor is enabled the counter will automatically go on and stay on.2011-04-03 19:03:00

Author:
gdn001
Posts: 5891


You ROCK!
Thanks!!
2011-04-03 20:39:00

Author:
Unknown User


you could use the counter, but this is what toggle switches were designed for. I would go with the toggle since it is much more obvious what it does when in create mode.2011-04-04 05:08:00

Author:
tdarb
Posts: 689


The problem with using a toggle is it can be toggled off. If player leaves the sensors range and then enters the range again it toggles off. I don't know, maybe that's a good thing for this particular situation.2011-04-04 05:42:00

Author:
riverad08
Posts: 104


The counter is a much better solution for this case. This is not the purpose toggles were designed for. Actually the toggle is a quite useless piece of logic designed for one single purpose that could be achieved just as well with a selector.2011-04-04 11:37:00

Author:
Linque
Posts: 607


Switching between an on off state is not what toggles were designed for? That is the very definition of the word toggle.

The counter works fine, I never said it wouldn't. It may be more thermo efficient, but I wouldn't say that it is much better. It can be less appropriate in some cases. It just depends what you design for. I tend to try to make things as clear as possible from a readability standpoint, and a counter is just not very clear to me three months down the road when I have to revisit things.

To me, the function is much more immediately obvious using a toggle with a NOT gate and AND to prevent repeated toggling. I immediately know just at a passing glance that I want something turned on once.

The only time it would unequivocally be a better solution is if you were so tight on thermo that three* extra logic parts made things overheat. It's really just a matter of opinion and style though. I used to never use toggles, but I find myself using them more and more as I go.

*-The third would be an OR gate to allow for resetting
2011-04-04 16:57:00

Author:
tdarb
Posts: 689


To me, the function is much more immediately obvious using a toggle with a NOT gate and AND to prevent repeated toggling. I immediately know just at a passing glance that I want something turned on once.


To me, a toggle is only used for debugging - to enable/disable certain functions of my creation for testing while I build.
A red 1-step Counter on the other hand I use for permanent switching, and a 2-way Selector when I actually want to toggle between two states.

The thing is; there really is no right or wrong, when it comes to creating... Just go with the options you feel are the most intuitive.
In the end you are the only one (in most cases) who need to understand how the logic in your level work anyway
2011-04-05 14:10:00

Author:
Slaeden-Bob
Posts: 605


I vote for toggle.2011-04-05 17:49:00

Author:
Chicago51
Posts: 258


you could always put a timer with 0.1 seconds2011-04-06 13:48:00

Author:
p00ps1cl3
Posts: 1


...or include a tag sensor and dissolve a block with a tag on it LOL/JK ...or dissolve an inverted battery LOL2011-04-06 15:38:00

Author:
Unknown User


tdarb, since a 2-way-selector has the *exact* same function as a Toggle but with the additional ability of setting the initial state by tweaking the piece of logic, the toggle itself is absolutely useless. That's what I tried to say. And that the toggle is designed for situations where you can turn the system off as well as on.

But everyone's right when they say that to each his own way of building logic. I would comment the thermo bit about your post by saying that you shouldn't think about the thermo only when you are close to overheating. Rather you should always keep optimization in mind when building in order to save a lot of thermo space in the long run. But I myself am a bit lazy every now and then and want to build faster instead of optimizing perfectly, so I don't optimize perfectly either.
2011-04-06 18:10:00

Author:
Linque
Posts: 607


do they have to be player sensors? maybe you could use invisible holgram bars to activate the counter switch by putting an impact sensor on the hologram and setting it to include touching. P.S. Counter is better than toggle because the other players could toggle the emitters back off.2011-04-07 01:09:00

Author:
LBP2_Tutorialist
Posts: 225


WoW! O.o
You all certainly have some experience in this area!
Sorry to raise a bit of a controversy but THANKS for all the great info!

I went with a player sensor wired to a counter set to 1.
The level is done and works GREAT! A friend and I had a blast one evening putting it all together.

Let me know what you think!...
Knick-Knack-Paddy-BOOM! (http://lbp.me/v/zpwecc)
Yes, it's ANOTHER bomb survival but with a tacky knick-knacky twist! Hope you enjoy!

and THANKS again for the help!
2011-04-10 02:49:00

Author:
Unknown User


Linque, If you are only toggling between two states, then a toggle is much better than a selector as far as thermo is concerned.

A toggle only needs to store a single bit and a basic adder mechanism that flips it.

A selector has to store a variable length array, which means it must store an integer (N), and N*nodes bits. it must also contain the logic for a cycle input, and a means to ensure that only one output is active at a time.

Advantage toggle.

Now, in cases where you need one state to overide another, the selector wins hands down if there are constant inputs. Those tend to be unique cases.

I really think toggles are misunderstood. I did it too. Once you start playing with them though, you start to see the value.

BubbaStimpy. this has been a great conversation. it's a fun one to have. I know i have learned some things from it.
2011-04-10 04:39:00

Author:
tdarb
Posts: 689


Linque, If you are only toggling between two states, then a toggle is much better than a selector as far as thermo is concerned.

A quick experiment shows the thermo cost is pretty much the same for both.

In practise I almost always use a selector, since you can easily reset it to a default state which is very useful for testing.
2011-04-10 15:26:00

Author:
Aya042
Posts: 2870


I tend to use a toggle in situations where it's on or off, and a selector when it's this or that...perhaps a semantic difference, but one that makes personal reference to my own logic easier.2011-04-10 16:56:00

Author:
EvilWuun
Posts: 152


I just wish you could set the default state of the toggle without having to fire a signal through it. It feels like 'dumbed down' logic to me as you can't tweak it at all.2011-04-10 19:28:00

Author:
Linque
Posts: 607


...you can't tweak it at all.

Works for me.
2011-04-10 19:50:00

Author:
Aya042
Posts: 2870


Yeah, sorry to say, but I can tweak my toggle just fine...maybe another of LBP2's glitches?2011-04-11 07:30:00

Author:
EvilWuun
Posts: 152


Weird. I'll have to check again when I log in next time.2011-04-11 14:05:00

Author:
Linque
Posts: 607


I just double checked and you guys are right. As far as thermo goes, both selectors and toggles appear to be equal. i pasted 1000 of each onto chips and opened and closed them. Both seemed to occupy the same thermo space. That should be more than any level would ever need of either. I didn't test them in action though, so there may be a difference there.

I still think there has to be some extra overhead somewhere with the selector, but really it would be so small that it wouldn't much matter.

In case you are curious, 1000 of either takes up just over 1 bar of thermo when the chip is open. When both were closed the thermo was about 2/3-3/4 way up the bubble, when a chip was opened, the thermo rose to just shy of the second dash.
2011-04-11 22:58:00

Author:
tdarb
Posts: 689


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.