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

How can I do a: Danger platform probablity 20%, Safe 80%?

Archive: 6 posts


Hello

I'm on making two levels, and both of them need this logic.. here's the thing..

Let's say I want to make all possible probablities in a way that gives me 2 danger platforms and 4 safe platforms for example.. how is that possible?
I hope you can understand what I'm trying to say ><

Thanks in advance
2011-01-24 04:07:00

Author:
G-IH-O-S-T
Posts: 27


well I'm not sure how to explain the entire logic setup, but for probability, I would use a selector.

Now if you want 80% safe, and 20% dangerous, then you're going to have to set it up with 5 outputs of the selector.

1. Run a randomizer, set to one at a time, through each of the 5 inputs of the selector.
2. Have a 4 input OR gate that activates the safe platform.
3. Wire four of the selector outputs through the OR gate.
4. Wire the last output of the selector activate the dangerous platform.

If you want 2 dangerous and 4 safe (like you said in your post, but not in your title):
1. Same setup, just 6 inputs to the selector.
2. One 4 input OR gate for safe; one 2 input OR gate for dangerous.
3. Wire four selector outputs through the 4 input OR gate.
4. Wire two selector outputs through the 2 input OR gate.

Hope this helps.
2011-01-24 04:12:00

Author:
AeroForce22
Posts: 392


Depending on exactly what you want, this can be very simple or rather complex.

If you want each platform to randomly have an 80% chance of being safe, wire things up similar to what AeroForce22 said (there are several ways to get similar effects).

If you are willing to have one be dangerous and the rest be safe (or vice versa), that's likewise easy.

Similarly, if you're willing to have either one or two to be dangerous, that's only a bit more complex; just have it pick two random platforms and use OR gates.

If you want exactly a certain number (2, 3 whatever) to be dangerous and the remainder to be safe, that gets rather more complex You'd have to first pick a random platform to be dangerous, then pick one of the remaining platforms to be dangerous. The extra logic needed to pick a random different platform for the second one is certainly possible, but quite a bit more involved. To start with, you'd need to have the second be picked a moment after the first, so you'd need some kind of delay between the first and the second picks.

Unless you want to get into heavy logic, you may want to just set up two (or more) sets with one random platform from each set being dangerous. Not quite as random but a lot more straightforward.
2011-01-24 08:48:00

Author:
Balorn
Posts: 92


I'll post an intricate microchip you can contact me to pick up during the day.

PSN: Sid1120
Should be logged in 4hours from now.
2011-01-24 13:03:00

Author:
Unknown User


I always hated Or and And gates.. I always get the feeling they're too complex that I don't want to use them
but I'll be sure to do so and try your logic right after I get my Profile corrected

Thanks a lot
2011-01-24 16:14:00

Author:
G-IH-O-S-T
Posts: 27


if you're trying to make 2 random ones lethal you can use a 2 timers an or gate and a randomizer, first hook up the first timer to one input then hook up the other timer to the other input set the first timer to 0.1 and the second to 0.2 and hook the or gate to the randomizer and make one shot, that should do it if that's what you're going for.2011-01-24 17:25:00

Author:
TheSwede
Posts: 59


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.