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

Need simple solution

Archive: 16 posts


Right now I have an enemy randomly attacking 1 of four players (they are in different areas). Setting up a randomizer for that is easy. However, when one of the players die, I want it to ignore the dead player. I can have it not activate till it reaches a living player, but that means if it lands on the dead player it will go to the next player. That makes the chances 50% for one player and 25% for the other two. I don't want that. I was wondering if anyone has a simple and thermo friendly solution to this. This is the last hurdle in my way at the moment then I can start building.

The randomiser I am using is a wheel with sensors on 1/4 on each side for each player. When the attack is initiated a sensor goes down to be activated by the sensors below. Also, I need it so it still works if a player is brought back.

Thanks, and if you have any questions I will answer them when I get off work. I probably need to explain more.
2009-08-16 00:31:00

Author:
Roanoake
Posts: 166


Wow, that's a tough one.

The problem is that you need the 'randomizer' to recognize which of the possible locations need to be randomized through. If you consider all the possible ways that either 1, 2, 3, or 4 sackies can occupy 4 spaces, you'll need to consider 27648 different combination (I know, right?). I can't think of a simple way to make it work, but I'll keep thinking about it...
2009-08-16 01:27:00

Author:
comphermc
Posts: 5338


I know my solution isn't quite simple, but it works You could reroute the "reattack" signal, so it goes through the main attack wheel instead of a character select wheel, that way it won't hit the next person, it will just try and attack again. This might end up with a lot of "hit all" situations though D:2009-08-16 04:59:00

Author:
Burnvictim42
Posts: 3322


If you consider all the possible ways that either 1, 2, 3, or 4 sackies can occupy 4 spaces, you'll need to consider 27648 different combination (I know, right?)

Man that's a big number >_< After seeing what I wrote you just had to do the math didn't you It was tempting huh?


I know my solution isn't quite simple, but it works You could reroute the "reattack" signal, so it goes through the main attack wheel instead of a character select wheel, that way it won't hit the next person, it will just try and attack again. This might end up with a lot of "hit all" situations though D:

Yeah that would be a problem. If there is only one person left then it will be very unlikely that a single target move will be used. Especially since everything happens almost instantly.


I think I figured something out. Originally I had each player occupy 1/4 of a wheel. If one was gone, then the percentage would be screwed up. So, if I make each player occupy 1/4 of a 1/4 of the wheel in different combinations, then if one player dies the chances should stay equal. Just have to work out who goes where.

I think that solves it and it should be pretty thermo friendly. Thanks everyone who thought about it. If you think of another way let me know. I think I'm ready to start building.
2009-08-16 07:21:00

Author:
Roanoake
Posts: 166


Why not just make the wheel out of dissolve, and destroy each player's section after they die? Then, if that comes up again, just have the machine retry a set (or random) amount of time later, but not so long as to keep the player waiting. 2009-08-16 11:34:00

Author:
BSprague
Posts: 2325


The only problem with telling the machine to try again is that there might be a noticeable delay. Actually, rtm has come up with a randomizer that doesn't use a wheel in the traditional sense. It's pretty complicated, but it allows a another output to be triggered fairly quickly if necessary. It can probably be modified for your needs, but I doubt it would be thermo friendly. Still, if a single player is left, it might take a while for their "section" to be triggered. Hope your idea works.

Eh, the math isn't that bad (but that's coming from a future math teacher). It works out that there are 4 ways to organize a single player, 4*3 ways to organize two players, 4*3*2 ways for three, and 4*3*2*1 for all four.

Hence 4*(4*3)*(4*3*2)*(4*3*2*1) = 27648

(I hope that's right - I had to use my computer's calculator)
2009-08-16 12:22:00

Author:
comphermc
Posts: 5338


*facepalms* i just thought of a simple solution actually. Don't use a wheel randomizer, use a piston based one. SLS10 has one in their boss logic level somewhere.. don't ask me where, its been a while. Basically, that randomizer shoots up little keys to activate different switches. You'd have to make sure that the keys couldn't activate the attacks prematurely (ie: put something to block successful attacks unless the attack was cued), but all you'd have to do to get rid of the player would be to get rid of their key switch. It wouldn't be a poor chance of probability that way, it would go to 1/3, then 1/2 as normal.2009-08-16 18:18:00

Author:
Burnvictim42
Posts: 3322


Hmm, I will have to check that out later tonight when I can. I don't quite understand so I have to see it.2009-08-16 21:45:00

Author:
Roanoake
Posts: 166


Some kind of machine with magnetic key switches and sensor switches to detect any of the 4 players (I guess they're separated somehow).


The sensor switches could affect the randomizer somehow. I would use emitters. There could be four different sections for the randomizer. There are empty holes in some kind of spinning wheel (part of the randomizer) which could have keys emitted in them. These keys would be emitted as soon as someone steps near the sensor switch. Then the randomizer would do its thing and only let the boss attack people are alive. I'm so smart!

Unless someone made up a better solution already.
2009-08-17 00:16:00

Author:
qrtda235566
Posts: 3664


I just had an idea on how to do this that would work, but I have to actually make it to see if it works, because it is too complicated to explain, but still not thermometer intensive.

Here is a basic idea of what it would look like, sorry for the terrible illustration of it:
http://img26.imageshack.us/img26/7844/15957785.jpg
2009-08-17 00:33:00

Author:
BSprague
Posts: 2325


The sensor switches could affect the randomizer somehow. I would use emitters. There could be four different sections for the randomizer. There are empty holes in some kind of spinning wheel (part of the randomizer) which could have keys emitted in them. These keys would be emitted as soon as someone steps near the sensor switch. Then the randomizer would do its thing and only let the boss attack people are alive.

I don't really understand. The problem with the sensor switch is that the player is always there and can't really dodge the attack. It wouldn't really help with keeping the chances even either.



Here is a basic idea of what it would look like, sorry for the terrible illustration of it:
http://img26.imageshack.us/img26/7844/15957785.jpg

I sort of get that. What does each color represent though? And when does everything activate?
2009-08-17 05:09:00

Author:
Roanoake
Posts: 166


I sort of get that. What does each color represent though? And when does everything activate?


http://img26.imageshack.us/img26/7844/15957785.jpg

Okay, I'll try to explain this the best I can, but it is still a little confusing. I'll go color by color, though they don't really have any specific significance.

Blue Box/Pink Box - These are pieces of dark matter, that's simple enough.

Thin Brown Lines - Pistons. The vertical one is attached to a state switch which makes it bounce back and forth between the two bumpers. I'll get to the horizontal one later

Orange Blocks - These are magnetic key switches. When either one is triggered by a key on the green box on top of the piston (which I forgot to draw), they trigger the OR switch, which in turn tells the state switch to change the direction of the piston.

Four Green Blocks - These are the magnetic key switches that are for choosing the player to attack. They are made out of dissolve, so that they can be destroyed when they need to. Destroying one will make the ones above it fall, along with the red bumper. The red bumper falling into place will make it so that the piston still only moves between the three remaining players, regardless of which one was killed.

Black Circle - This is an emitter. What it will emit is a piece of dark matter on either side of the green block to temporarily stop it. This will be triggered when you have to choose a player to attack. While it is stopped, which can be controlled by setting the lifetime of the object, the horizontal piston will move the four blocks closer to the green block with the emitter, and one will be triggered. The four green blocks must have magnetic key switches that are turned 90 degrees counterclockwise with radii that don't overlap to avoid choosing two players to attack.

Tell me if I missed anything.
2009-08-17 11:17:00

Author:
BSprague
Posts: 2325


Ok I get it all now thanks. I won't be using it for two reasons. One, I'm not very good with pistons so building this could take me a couple hours. Two, your explanation gave me an idea. That idea lead me to redoing my entire system. Everything is now way more thermo friendly. Thank you for that.2009-08-18 02:02:00

Author:
Roanoake
Posts: 166


Ok I get it all now thanks. I won't be using it for two reasons. One, I'm not very good with pistons so building this could take me a couple hours. Two, your explanation gave me an idea. That idea lead me to redoing my entire system. Everything is now way more thermo friendly. Thank you for that.

If you have everything up and running now that's great. What did you use for a workaround?
2009-08-18 02:55:00

Author:
BSprague
Posts: 2325


Heh, it's pretty funny actually. The most simple thing ends up being the most thermo friendly. I ended up copying what most of my system is and just making it so the players are taken away when not there. I didn't change anything that much really.

The original set up for every attack and decision was decided by a wheel with sensors determining if it is a crit, miss, or hit. This required a lot of sensors and key switches. For some reason when I was looking at what you drew I replaced it with attacks. This led me to erasing most of my sensors because they aren't needed. If nothing is triggered then that counts as a solution too.

I know I'm not good at explaining anything and this makes no sense. Especially sense you don't know what the original method looked like or how it worked. I think only burnvictim does.

If you want I could show you the level once I get everything set up.
2009-08-18 03:15:00

Author:
Roanoake
Posts: 166


I'll take a look at it when I get back. I have 3 solid days of lbp planned before I have to move back to school.2009-08-18 03:42:00

Author:
comphermc
Posts: 5338


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.