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

Help with point givers

Archive: 12 posts


So I've read up on point givers and I understand the gist of how to use them. I've set up my four player bots to award points for kills and take them away for deaths and that's working fine, but I'm wondering how to handle more ambiguous kills. Let's say that during a duel, one of the players falls to his death (the sackbot dies but the player in his follower just zips to the spawn point to get a new bot). That should count as a kill for the player he was fighting. And then, suppose a player falls to his death when he's not fighting anybody else: nobody should get points for that kill. Any thoughts on how I'd do that or if it's even possible?2011-02-09 20:44:00

Author:
Sehven
Posts: 2188


Maybe just have points minused if you die?

For example, +100 points for a kill, -100 for dieing.

In versus, 100 points are taken away if you die. Maybe have something that kills the player and the spawn back at their checkpoint?

Or since it's a duel, 1 on 1, if you die anyway the other player gets points, regardless if they are dead getting their new bot, but say there is a limit on bots you can respawn, the points giver should stop giving once 1 player runs out. This is simple, an AND switch with 1 inverted output turned OFF when the respawn limit is reached.



I'm gonna keep on thinking 'bout this and when I get something better, I'm gonna come back here and tell you.

Unless someone comes up with something better than me...
2011-02-09 20:52:00

Author:
mutant_red_peas
Posts: 516


Well right now killing another player gets you 50 points and dying costs you 10. There are four possible players so I can't just set it to automatically give the points to "the other guy" 'cuz there could be three other guys and I only want it to award points if there's somebody that he's actively fighting at the time of death. Basically, I need the score giver to grab the player data of the nearest player other than the one actually falling into the hazard if there's a player close enough to have caused the fall.2011-02-09 21:13:00

Author:
Sehven
Posts: 2188


Timers/counters(forgot the name, it's the one which looks like a loading bar), perhaps? Make it so it activates the timer when a battle starts, and when the battle is concluded or a person flees, the timer goes back down to zero? Then you make it so if the timer is active, you may lose points. Also try using gates(OR, AND, XOR).2011-02-09 21:19:00

Author:
Cronos Dage
Posts: 396


Um... what? Timers have nothing to do with my question. I'm trying to rig a system that can detect if another player is near enough to have caused a kill and, if so, award that player the points for the kill.2011-02-10 02:12:00

Author:
Sehven
Posts: 2188


Basically, I need the score giver to grab the player data of the nearest player other than the one actually falling into the hazard if there's a player close enough to have caused the fall.

Tricky.

If it helps, you can store player info data using a Selector. When activating an input, if the signal contains player info data, the activated output will remember that data as long as that output remains active. Using this, you could rig up a system which remembers who the last player was who came within a certain range of that player.

See also this thread (https://lbpcentral.lbp-hub.com/index.php?t=48588-Observations-about-player-data-and-logic-gates).
2011-02-10 10:35:00

Author:
Aya042
Posts: 2870


I might try something with the selector in the future (sounds pretty useful), but it turns out all I had to do was switch the wires going into my AND gate:


AND
First input with player data is priority.
When first input is active it won't tranfer player data from first or second input unless you activate all inputs of the gate.

I had a player sensor rigged to detect the nearby player and an impact sensor set to detect the dying player feeding into an AND gate. I had made the mistake of hooking the impact sensor into the top port which awarded the dying player player the points, but when I switched 'em, the nearby player got them instead. Yay!

Thanks for the tip and the link to that thread.

[edit] Tested it and it seems that my score system is working perfectly now. Thanks again.
2011-02-10 20:27:00

Author:
Sehven
Posts: 2188


Not sure exactly what kind of fighting game this is, but I'll take a shot at the "dying from a fall" problem.

How 'bout this: When an enemy attack connects with you, it triggers a temporary state where dying from a fall counts as a kill for the player who delivered the attack. It also triggers an "empty and then fill back up" timer with a time of about 0.5s, which is connected to an AND gate along with a ground sensor. The AND gate's output is set to reset that temporary state back to one where dying from doesn't give points to anyone.
2011-02-10 20:43:00

Author:
Blue Helmet
Posts: 306


Sort of. Dying from a fall is what I was trying to suss, but there's no such thing as an attack connecting without killing you, so I rigged it so that if another player is in the vicinity when you die from a fall, the game assumes it was their fault (you were running from them or they knocked you down or something) and gives them the points. Turns out a player sensor is even smart enough to give the points to the closest player.2011-02-10 21:08:00

Author:
Sehven
Posts: 2188


How 'bout

When you die and you fall, for example, or you lose all your health, a thing is emitted where you died (if you fall have it emitted in the middle) and the first player to collect the thing dropped gets the points?

That's all I can think of ATM.....
2011-02-11 07:04:00

Author:
mutant_red_peas
Posts: 516


I don't want to sound ungrateful--I really appreciate when people take the time to offer suggestions for my problems--but the last two suggestions came after I posted this:


Tested it and it seems that my score system is working perfectly now. Thanks again.

Aya's tip was what I needed. The problem is solved now
2011-02-11 07:14:00

Author:
Sehven
Posts: 2188


Oh. Ok.

I didn't see that
2011-02-11 07:16:00

Author:
mutant_red_peas
Posts: 516


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.