#1
Basic Emitter Help
Archive: 10 posts
Hello everyone, I am trying to set up a basic emitter that emits a light once the player passes a prox. switch. Problem is, I don't know #@(! about emitters and for some reason the thing keeps on emitting when I unpause or play the level. I just want it to emit ONCE. How do I stop it from being emitted in the first place until the proximity switch is triggered? I figured setting up the input to the emitter that the emitter would NOT do anything until the input told it to do something, but apparently I'm doing something wrong. Is it me or are emitters the only object in the game that do not connect to other logic the same way? | 2010-06-07 06:48:00 Author: schm0 ![]() Posts: 1239 |
A prox switch should work just fine! If you want the emitter to emit the object the moment the player passes it, just set the proximity switch to one shot. On this setting, it will emit every single time someone passes the switch. the emitter itself should be set to have max 1 object at once, and whatever life cycle you want the object to have. If you want the emitter to emit once, and only once, when the player passes the switch for the first time, use a perm switch. You can find one in LBPC's logicpack. Just hook your proximity switch up to the permanent switch, set the permanent switch to one shot, hook it up to your emitter and you're good to go! Also, if it emits an object when you unpause the level, just delete the object. It shouldn't emit again if you've hooked the emitter up to your switch. | 2010-06-07 07:08:00 Author: Duffluc ![]() Posts: 402 |
^^ Just what I would have suggested. Except to make the emitter emit only one light, one time, you don't need a perm switch - just set the "Max Emitted" setting to 1. | 2010-06-07 13:01:00 Author: Holguin86 ![]() Posts: 875 |
I am trying to set up a basic emitter that emits a light once the player passes a prox. switch. Problem is, I don't know #@(! about emitters and for some reason the thing keeps on emitting when I unpause or play the level. I just want it to emit ONCE. Set the emitter to... Max Emitted: 1 Max Emitted At Once: 1 Set the sensor switch to... Behaviour: One-Shot How do I stop it from being emitted in the first place until the proximity switch is triggered? Emitters can be a bit of a pain in that respect. You can set the emit interval to a really high value, or steal the special infinite emitter from the Jumping Tank object in the Wilderness theme, which will only emit when fed a one-shot input. The other thing that helps is to unpause the game after connecting the one-shot switch to the emitter, but before you change the settings on the emitter. This should ensure that any pending emissions are cleared from the event queue. If you're not using the infinite emitter, then every time you disconnect and reconnect the wire to the emitter, you might find it emits again, so try to avoid doing that. To extract the infinite emitter (in pause mode)... Create a thin piece of card. Place the Jumping Tank object somewhere in the level. Capture the tank, then delete it. Now place the tank you captured. Select the emitter on the front of the tank and detach any wires. Select the same emitter, and press triangle to detach. Attach to the thin piece of card. Capture the thin piece of card. Delete the tank, which will also delete the emitter from the card, but it doesn't matter. When you want to use it, place the captured card, detach the emitter, put where you want it, and delete the card. The reason to do it this way, rather than just selecting the emitter from the tank, and pressing L3 to copy, is that once you've placed it, you can't then detach it again. Also note that if you change the frequency of the emitter to something other than infinity, you won't be able to change it back. | 2010-06-07 14:49:00 Author: Aya042 ![]() Posts: 2870 |
Set the emitter to... Max Emitted: 1 Max Emitted At Once: 1 Set the sensor switch to... Behaviour: One-Shot I had done this, but as soon as I unpaused (my player was well away from the prox switch) it emitted the object anyways. Thus, my initial frustration. Also, I did not pause while near the prox switch (i.e. leaving it in the ON stage) Emitters can be a bit of a pain in that respect. You can set the emit interval to a really high value, or steal the special infinite emitter from the Jumping Tank object in the Wilderness theme, which will only emit when fed a one-shot input.Interesting... although probably too much effort for me to consider practical at this time. I may come back to it, however. If you want the emitter to emit once, and only once, when the player passes the switch for the first time, use a perm switch. You can find one in LBPC's logicpack. Just hook your proximity switch up to the permanent switch, set the permanent switch to one shot, hook it up to your emitter and you're good to go! I had set it up to a normal two way switch just to test it out. The switch setting was On/Off, obviously, and starts in the "OFF" position. Naturally, I expected the emitter to do NOTHING since it was in its OFF stage. Lo and behold, I unpaused, and poof! It emitted the light. This seems extremely counter intuitive. Also, if it emits an object when you unpause the level, just delete the object. It shouldn't emit again if you've hooked the emitter up to your switch.Then I would have to set the emitter to allow more than one emitted object, which won't be able to use with my prox switch, no? Here's the scenario: Sackboy comes across a hole. Sackboy jumps down the hole. A global lighting contol turns off the lights. A light (previously not there) is emitted from above, providing the illusion of a dark hole with a slight bit of light coming down from the room above. This is activated by prox switch at the bottom of the hole. Unfortunately, I can't figure out why the heck the emitter is emitting when it's hooked up to a switch in the "OFF" position. It just doesn't make sense. If I hook up a set of inputs to any other piece of logic in the game, it follows that logic. No matter what I've tried, when I unpause or go to play mode directly from pause, it's there from the very next instant. That just doesn't make sense to me. Somehow I have a feeling that I am going to have emit, demit, and re-emit the stupid thing (or some other convoluted LBP solution) just to get the desired effect. ![]() Thank you all for your responses! | 2010-06-07 16:01:00 Author: schm0 ![]() Posts: 1239 |
Unfortunately, I can't figure out why the heck the emitter is emitting when it's hooked up to a switch in the "OFF" position. Basically, when you first place the emitter, it looks at the Frequency setting, and places an 'emit event' in the simulation event queue to occur at that interval. When that event occurs, as long as the emitter is still active, another event is placed in the queue. Attaching a switch set to 'off' to the emitter will prevent any further 'emit events' from being added to the queue, but it won't remove the existing event. To do that, you need to force the event to expire. So (in pause mode)... Place the emitter but don't configure it yet. Attach the sensor switch in one-shot mode. Unpause the simulation for a least the amount of time specified in the Frequency (default is 2s) to allow the event to expire. Pause the simulation. Now configure everything. ...should do the trick. Note that if you reactivate the emitter at any time, by detaching the wire, or activating an attached switch, another emit event is automatically added to the queue, so you'll have to force the event to expire as above. The infinite emitter is a special case, and will never add an event to the queue, which is really useful in many cases. It's also useful to know that the emitter 'remembers' how many items it's emitted even in create mode, and as soon as it hits 'Max Emitted' it won't emit any more. To reset it, you have to set Max Emitted to infinity and possibly unpause the simulation before setting it back to the value you actually want. I can swing by your moon next time I'm on if you're still having problems. | 2010-06-07 16:23:00 Author: Aya042 ![]() Posts: 2870 |
Let it emit the random object with "Max Emitted" set to more than 1, then delete the object it emitted. Change "Max Emitted" back to 1. As long as you don't pause then unpause, it should work fine. (I think that's what Aya just explained lol) | 2010-06-07 17:35:00 Author: Holguin86 ![]() Posts: 875 |
Remember that any object emitted in create mode will count towards your max emitted. So you will need to account for this when you configure your max emitted (i.e. setting it to 1 after some have emitted in create mode means it will never emit anything). Another issue that you might face with this is the one-shot triggers re-activating when someone joins the game, or when you rewind (although the people joining is a bigger issue). This is typically a problem when people trigger 1-shots (or on/off devices that act like 1-shots - mouths etc.) from logic of any kind, especially perms. | 2010-06-07 17:46:00 Author: rtm223 ![]() Posts: 6497 |
Another issue that you might face with this is the one-shot triggers re-activating when someone joins the game, or when you rewind (although the people joining is a bigger issue). Really? I thought it was only when the one-shot switch was 'enabled', either because you've fed a p-switch into it, or set it to inverted. As long as you don't rewind to a point where the switch is active, it shouldn't retrigger. | 2010-06-07 17:51:00 Author: Aya042 ![]() Posts: 2870 |
Sorry, that should read re-triggering and yes you are right. However, you have no control over people joinging the game, so it is still a design issue and I've seena few levels that break horrendously when someone joins, due to one-shot signal failings. | 2010-06-07 17:57:00 Author: rtm223 ![]() Posts: 6497 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.