Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet Karting    [LBPK] Ideas and Projects
#1

Calling all logic maestro's! :)

Archive: 12 posts


Hi guys, so I am looking for a little bit of assistance for my next project. The concept is simple enough, it's a game of Cops & Robbers in a vast city environment with 7 cop cars chasing 1 unique 'robber' vehicle. The idea is that by using weapons, the cops try to disable the robber, who is unarmed. The twist is that once the robber is hit, I want the person who scored the succesful hit to transform into the 'robber' vehicle and the previous robber to transform into a cop, so that there is only ever one 'robber' on the map able to score by surviving.

I figure I probably need to have a selector with 2 ports setup on each spawnpoint, somehow triggering the vehicle transformations at the right time and giving a continuous score to the robber vehicle as long as they survive (without the ability to use weapons), while the cop who gets the succesful kill gets a bonus score and transforms into the robber after the hit is detected. BUT, I'm dumb when it comes to programming this stuff, so I'd really appreciate a little bit of insight from those of you who seem to understand it a whole lot better!

Also, I was hoping there was some sort of copyable level available that could help me study further. 'Egg Karting' by UFG would seem pretty close logic-wise, but alas, you cannot edit or even view UFG tracks in the editor (thanks for sharing guys!) but perhaps there is something out there, maybe by LBPK_Community as I know they did a lot of tutorial like copyable levels early on?

Help is hugely appreciated, thanks!
2013-09-08 11:57:00

Author:
atheistsw
Posts: 147


Hiroshige0, are you there?


Project seems interesting



I figure I probably need to have a selector with 2 ports setup on each spawnpoint, somehow triggering the vehicle transformations at the right time and giving a continuous score to the robber vehicle as long as they survive (without the ability to use weapons), while the cop who gets the succesful kill gets a bonus score and transforms into the robber after the hit is detected. BUT, I'm dumb when it comes to programming this stuff, so I'd really appreciate a little bit of insight from those of you who seem to understand it a whole lot better!



Unfortunately i am not a boss with logic neither.
I just think you'll have to activate the selector with a spawn sensor.
You will have too to use somewhere an and gate because otherwise you will have the following problem: if a cop hits a cop, the first cop will turn in a robber and ther will be 2 robbers. So you will have to say: if the car is hited AND if the hited car is a robber then you actvate the spawn sensor.
I don't know exactly how to translate this on logic langage but this may be a path to follow.

I'll think about it next time i'll play.
2013-09-08 14:20:00

Author:
gipsy
Posts: 408


This sounds like it'll be pretty complex.

Firstly, I'll say that I may have a misconception about a logic here or there, and I apologize if it turns out that I do.

I imagine you'll need 2 sets of spawn points, one set to team 1, and the other set to team 2. Like gipsy said, for each set you'd need a selector connected to both of them. The default would be set to team 1, or "cops." Team 2 is "robbers." You'll need an XOR logic tied into an AND logic that's tied into the input of the selector. The outputs of the team 2 spawn's will be tied into a counter (set to 1, and the output of the team 1 spawn tied to the counter reset) tied into the input of the XOR as well as a battery. The other side of the AND input is tied to a reset sensor. You would turn off friendly fire.

The robber kart will have a weapon blast sensor outputting to a reset logic and a transmitter. The cop kart will have a receiver that outputs to a timer (half a second or so) which outputs to reset itself and a reset logic.

At the start, you will have the pre-race output to a randomizer outputting to the team 2 spawns. This will need to be deactivated or destroyed after the start of the race.

So that at the start of the race, a random player is selected as the robber. The spawning of the robber will set the counter to full, which deactivates the signal from the XOR gate (combined with the battery), so that it cannot be spawned with while another robber is out. When a robber is hit by a weapon and reset, it will reset as a cop, simultaneously resetting the counter, opening up the robber spawn. The act of shooting the robber sends the signal back to the attacking cop, starting the timer (giving time for the robber spawns counter to reset) which auto resets the cop into a robber.

For the robber kart, you can place a timer for 1 second, outputting to a score-giver of however many few points and also to it's resetter, giving a continuous pointage increase to the robber as long as they're alive.

The transmitter on the cop kart can output into a point giver as well, to give points for shooting the robber.

Hope this works as intended and I'm not mistaken. Good luck!
2013-09-09 03:24:00

Author:
StJimmysAdiction
Posts: 388


I imagine you'll need 2 sets of spawn points, one set to team 1, and the other set to team 2. Like gipsy said, for each set you'd need a selector connected to both of them. The default would be set to team 1, or "cops." Team 2 is "robbers." You'll need an XOR logic tied into an AND logic that's tied into the input of the selector. The outputs of the team 2 spawn's will be tied into a counter (set to 1, and the output of the team 1 spawn tied to the counter reset) tied into the input of the XOR as well as a battery. The other side of the AND input is tied to a reset sensor. You would turn off friendly fire.

This is a very fascinating solution, though the transition from cop to robber would probably be really jarring I imagine (does your score get penalized too for a reset? I can't remember).

This looks like a simplified variation of what I was attempting to do with my infected level: spoof "teams" in a game where everyone was on the same team. It involved a reversed health bar that on triggering cycled a selector with various tweakers attached to each port. I've more or less given up on trying to get that level to work for me, so how about I publish it tonight as a logic demo for you atheistsw? I got a lot on my plate today, but I'll try to have it up by 10pm USA EST time and leave it up until tomorrow.

I think it'll have all the answers (and maybe then some) you need.
2013-09-09 13:30:00

Author:
Hiroshige0
Posts: 114


This is a very fascinating solution, though the transition from cop to robber would probably be really jarring I imagine (does your score get penalized too for a reset? I can't remember).

Yes, I agree, it might be somewhat jarring, but I couldn't imagine how you'd switch sides more smoothly. At least it makes sense for the robber to be reset after being shot. I also wouldn't be sure how else to control the team effects of only one robber at a time, that can't use weapons (with a kontrolinator on robber spawn), and the cops not shooting/targetting each other with homing weapons. I'm sure there are other options out there, and with your pedigree, you'd find it .

P.S. Yes I think your score gets penalized by default, but that should be something you can change in the global settings.
2013-09-09 14:24:00

Author:
StJimmysAdiction
Posts: 388


Thank you for all your answers guys, lots to consider there and I never considered it being quite so complex... probably gonna use a lot of budget on darn logic lol, guess i'll have to scale back my city a bit...

Hiro - that would be great, thank you!

Is it not possible for the kart transformer input to be triggered on the fly by a successful weapon hit, without having to reset the player? I kind of imagined it working and looking a lot like the way you could change your car on the fly in the criminally underated Driver: San Francisco?

Also, you mentioned homing weapons, but I intend to create custom weapons so none of them are going to be homing, just straight shot and mine varieties, would that make a difference?

Also, seeing as how this thread somehow got moved to the 'Projects' section despite me explicitly asking for help, I might as well post a picture of the 'robber' car I made last night.

https://lbpk-production.s3.amazonaws.com/player_creations/1002792/data.jpg
2013-09-09 14:58:00

Author:
atheistsw
Posts: 147


Yes, I agree, it might be somewhat jarring, but I couldn't imagine how you'd switch sides more smoothly.

When I get the chance to put the level up, you'll see that it is actually pretty doable, as long as he visually identifies the change; if he's using custom karts, that will be (relatively) easy.


At least it makes sense for the robber to be reset after being shot.

It can, unless he wants to do a lifebar setup (and if your thinking of using homing weapons, that'd probably be a good idea). The method I'll post tonight should work in both cases.


I also wouldn't be sure how else to control the team effects of only one robber at a time, that can't use weapons (with a kontrolinator on robber spawn), and the cops not shooting/targetting each other with homing weapons.

I'm not sure about filtering out homing weapons targeting the wrong players, but I did successfully manage to get battle brains to target specific players by using tags. The level I made also filters out impacts from weapons that were from the other team and could only hurt players with the correct tag.

Also, I bet its possible to apply a weapon giver that constantly applies a weapon to the robber, but the weapon has the "can kart fire weapon" unchecked.


Thank you for all your answers guys, lots to consider there and I never considered it being quite so complex... probably gonna use a lot of budget on darn logic lol, guess i'll have to scale back my city a bit...

It might not be as expensive as you think, I estimate for eight players and using the barest logic imaginable, you'll use up about 1/4th of your thermo. It at least can't be more than half, because that's what my level took. And I went nuts.


Is it not possible for the kart transformer input to be triggered on the fly by a successful weapon hit, without having to reset the player? I kind of imagined it working and looking a lot like the way you could change your car on the fly in the criminally underated Driver: San Francisco?

It is possible, and my level pushes that idea to the limits, but it requires a lot of weapon customizing. If you don't want your weapons to reset the player, you'll essentially have to rewrite how weapon impacts and their effects work. This can have limited success, since one of the major reasons I had to give up on my level (for now) is because one of the weapon types I created (the self-weaponator) wasn't working as expected.


Also, you mentioned homing weapons, but I intend to create custom weapons so none of them are going to be homing, just straight shot and mine varieties, would that make a difference?

Then this should work great for you! My level used nothing but straight shot/mine-based weapons.

EDIT: The level is now up. I have removed a lot from the existing logic to make it easier to understand, but I'm sure there will be questions. Let me know!
2013-09-09 16:14:00

Author:
Hiroshige0
Posts: 114


Okay, so thanks Hiro, I grabbed your level download and had a look... the amount of logic you have on just the one spawnpoint is staggering! I did an experiment and copy/pasted that spawnpoint 7 more times, the thermo shot up from 25 to 50%! So... I will not be using a quarter of budget just on logic, no way, I am making a detailed city environment and cannot possibly spare that much for programming....

Instead I will just be making it a straightforward team battle, 4 cops vs 4 robbers, not as interesting or unique I know, but taking up far, far less budget and the basic concept will still survive. I might also create a checkpoint race as well, will see how the city turns out, first and foremost that is my priority. I've been playing a lot of NFS: Most Wanted and want something similar in LBPK, lots of shortcuts, alleyways and fun jumps galore!

I appreciate all you guys help though, if only LBPK had a completely separate thermo for logic, utterly ridiculous it uses the same budget as everything else!
2013-09-11 15:45:00

Author:
atheistsw
Posts: 147


Okay, so thanks Hiro, I grabbed your level download and had a look... the amount of logic you have on just the one spawnpoint is staggering! I did an experiment and copy/pasted that spawnpoint 7 more times, the thermo shot up from 25 to 50%! So... I will not be using a quarter of budget just on logic, no way, I am making a detailed city environment and cannot possibly spare that much for programming....

Hahaha, then its a good thing you didn't see it before I reduced the logic, you'd have had a heart attack!

I've given your challenge some thought and went back to the drawing board. If your still interested, I've republished the level to reflect the absolute bare minimum of logic to pull this off. The changes in "team" classes will now only reflect in the kart they drive and the weapon they use. Plus, the thermo now consumes a fraction of what it once did.

Let me know how that works for you.
2013-09-11 18:34:00

Author:
Hiroshige0
Posts: 114


Hahaha, then its a good thing you didn't see it before I reduced the logic, you'd have had a heart attack!

I've given your challenge some thought and went back to the drawing board. If your still interested, I've republished the level to reflect the absolute bare minimum of logic to pull this off. The changes in "team" classes will now only reflect in the kart they drive and the weapon they use. Plus, the thermo now consumes a fraction of what it once did.

Let me know how that works for you.

Okay thanks, I will certainly check it out and see if I can stomach the thermo hit!
2013-09-12 14:56:00

Author:
atheistsw
Posts: 147


Hi Hiroshige0,
Why can't i copy your level? Did you make it right know uncopyable?
2013-09-15 10:19:00

Author:
gipsy
Posts: 408


Whoops! I keep forgetting to change that every time. Fixed now, also added some additional in-game notes and fixed a crippling logic bug.2013-09-15 14:34:00

Author:
Hiroshige0
Posts: 114


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.