Home    LittleBigPlanet 1 - PSP - Tearaway -Run Sackboy Run    LittleBigPlanet 1    [LBP1] Help! [Archive]
#1

Logic Question?!?

Archive: 8 posts


First off, I know my logic is probably quite rudimentary, so please try not to snicker too loud.

I have created a hallway section (in a lvl I hope to enter into the spooktacular) that the sackplayer has to run down. They must avoid spikes on the floor whilst being chased by a moving wall of spikes that drops down from the ceiling then follows the floor line (how original). It works, with an issue(more on that later). Anyway, logic for this system begins like this.

There is a checkpoint in the beginning of the section. I will call it CP-A. It is placed before the moving wall is triggered.

player runs past CP-A and down a bit, setting off a player switch(set to direction, which we will call PS-A) attached to a piston placed on and in front of the moving wall, PS-A activates the pistons that bring the moving wall down and forward.

The issue I am having is due to the fact that I need to have the moving wall reset if the player dies in the hall. The logic in place for the reset is this.

attached to the piston that holds PS-A is another player switch (PS-Aa). It is set to on/off and it activates a checkpoint in a room. If you die in the hallway, you go there. That room is a waiting room for the wall to retract to its original position. There is a magnetic switch(MS-A) on the moving wall that is activated when retracted fully. MS-A activates CP-A and it also kills the player. At which point player is ready to give it another go.

Finally, on to the issue. The time spent in the waiting room can seem a bit long. I would love to cut that down. I cant speed up the pistons for obvious reasons. I am sure this is not an original idea so it seems likely that someone has some incite on this. thanks for reading.
2010-09-29 16:16:00

Author:
EinRobot
Posts: 739


You could try placing winches next to (parallel with) the pistons with the winches set to the same max and min range, but with a faster (reset) timing. I haven't tried this, so it might not work. I believe the winch is stronger than a piston so when the ceiling comes down the winches and pistons will extend, but the piston will extend much slower so the winches will have no effect. When you want to reset the ceiling position by reversing the direction of the winches and pistons the winches will overpower the pistons and raise the ceiling much faster than the downward motion.

If that doesn't work - another (more complicated) solution would be to define the whole ceiling and piston assembly as a monster, so when the player dies the ceiling is destroyed and a new one is re-spawned.

Hope this was useful and good luck with the competition.
2010-09-29 18:32:00

Author:
fluxlasers
Posts: 182


Adding on to what fluxlasers said:

You could try placing winches next to (parallel with) the pistons with the winches set to the same max and min range, but with a faster (reset) timing.
first place a GRAB switch on the wall, put the wire on the piston. set it to go out. since it cant be grabed, then the wall always wants to go out to the end of the hall.
After seting the piston/winch, set the piston's STRANTH to about 7-6 Then, set the winch to a faster speed (not to break it) and put the stranth to 10. Now what you need is a pece of logic from the logic pack. The one switch in the waiting room would ativate a winch that pulles a mag key into a key switch that pulles the winch on the wall. then when the player goes in the switch in the hall, another wintch pulles the mag key out of the switch,than the wall will go out at the piston's speed.

EDIT: The logic you want is a set-reset (https://lbpcentral.lbp-hub.com/index.php?t=18341-Tutorial-2.1-Using-the-Set-Reset-Switch) switch! insted of platforms, its the wintch pulling the wall back or let the wall go.


I know that this might be very hard to follow, so PM me if you need some more help. i would be happy to help.
2010-09-29 22:43:00

Author:
Unknown User


Thanks guys for the input and info. I just finished with a solution that lets me eliminate the waiting room, and also allows the illusion of an almost instantaneous reset. I just made two identical hallways. If you die in one hallway, you spawn at the start of the second one and vice versa. The opposite one will reset while you play. At the end of each you will port to a new section. plus I can change them subtly to mess with players, maybe.2010-09-29 23:03:00

Author:
EinRobot
Posts: 739


Wow! i would have neve thought of that!
I know you did not want help, but i just thought up something that can help:
If you want to have it random, just have an AND switch that knows when both halls are reseted, then get a switcher (also in the logic pack, but forgot the name) and each side has an AND switch. The first and switch goes to one of the inputs on both of the switcher's ANDS. then, when the player spawns, the other sides of the and gates a true, and the first one that has both inputs that are true, the players go to that hall!
Im very glad i can help!
2010-09-29 23:24:00

Author:
Unknown User


I tried the first solution I gave in my previous post and it works just how you want it to. When you are under the ceiling it moves down slowly, and when you either die or successfully avoid the hazard the ceiling raises quickly. The piston's timing determines the slow downward movement and the winches' timing determines the faster upward movement. you can adjust the piston strength and the winches' timing if you have problems with it breaking, but I had no problems with a piston strength of 10 and a winch timing of 1 second.

It doesn't require any logic, just a proximity switch (set to direction) covering the area under the ceiling. Plus this solution will allow the player to go back (if they wanted).

Personally I think it is a bit unfair to kill the player just after they have managed to avoid the hazard, plus it prevents anyone from aceing your level.

If you want the hazard on the floor to be random, it can be done using some "more complicated" logic. If you want some help with this add me as a friend and I'll do it for you.
2010-09-30 10:12:00

Author:
fluxlasers
Posts: 182


I'm sorry, I didn't read your first post properly and thought you wanted the full ceiling to just move down. I didn't notice that you had a spikey block chasing the sackboy.

I think my second suggestion may be more suited to your problem - defining the moving block as a monster and using an emitter to reset it. I could help you with this also if you're still having problems with it.

Sorry for the misunderstanding.
2010-09-30 10:26:00

Author:
fluxlasers
Posts: 182


I was just going to suggest that - using Emitters.
First, you need to capture everything related to the moving object. Because the nature of the reset, you can change the directional PS-A switch to one-shot, hook it up to a Permanent Switch, which you will hook into the piston moving the object. Or you can keep it directional, but it needs to be in the captured object.

Then you set the emitter's tweaks to:
Frequency: *anything*
Lifetime: *infinite*
...
Max Emitted at Once: 1

When the player dies, a sensor switch will make the emitter emit a new moving object, and the old, moved object will disappear. Works, and no delays!

(Though it might not be *that* simple as I haven't seen the scenario... just send me a friend invite and I'll come to see and help )
2010-10-03 19:10:00

Author:
Unknown User


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.