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

Score giver frustration

Archive: 9 posts


I'm battling sackbots in a vs
When one kills another he should get the score but the player that dies gets it.

Please help

Please mo speculation just proven methods
2011-03-04 16:48:00

Author:
CENTURION24
Posts: 266


How are you emitting the sackbots? It matters.2011-03-04 17:43:00

Author:
Shanghaidilly
Posts: 153


Score givers were a pain in the but for me. What I did for my level was use a tag sensor on the thing that gets killed connected to a score giver (mine is a collectable not a player, but the concept is similar). The tag sensor is looking for a tag the player sackbot holds. What you could probably do for your bots. Is have when the Player health reach zero. Have it look for tag sensors that the other sackbots (and weapons/attacks they give/throw) hold and connect this to a score giver. I don't know if putting them all to an OR will work. You might have to put a timer (about 0.1-0.3 seconds) before the Sackbot actually dies so it could actually sense these tags and give the appropriate points.

Now something I need to mention is on one day when I was editing something completly unrelated to the score givers. When play testing the score givers stopped working and didn't give points to anybody (The scores were black, which was why i was asking about that last night). I had to make them "To friends" to fix it, which you obviously don't want. I saw this bug happen to a couple other peoples levels too. So you might want to keep some backup copies. Who knows maybe your level was hit by this and since your score givers involve sackbots it gives the points to the dying bot instead of nobody.

Another idea is when the bot dies, It emits a holographic tag (Again you might need that timer before actually dying to emit it) Then place a tag sensor to score giver that matches this on each, sackbot/weapon/attack (if some things don't work, maybe place the score giver only on the bot and use ORs from the tag sensors from everything else) Obviusly this holographic tag is going to have a very short lifespan so other players don't get the kill as well.
2011-03-04 18:07:00

Author:
JKthree
Posts: 1125


Need to know a little more about the situation.

The problem with tag sensors is you might get credit for other people's kills but that can be worked around with unique tags for each player, but it doesn't necessarily even have to be that tedious.
2011-03-04 18:23:00

Author:
Foofles
Posts: 2278


This is what I tried

There's a counter for the health bar. That's connected to a (and gate).
There is also a tag sensor reading the individuals sword tags connected to the same (and gate).
That (and gate) is connected to a tag that is unique to each players tag sensor.
That tag sensor is connected to a 1 count counter witch is connected to a 1 second timer.
The timer is connected to reset the said counter, it's own reset input and a score giver.

Results are the player that has there sacbot die gets the score. Also sometimes the score is black and so no one gets it.


I've tried simpler way but had the same result. The sackbots are being emited by a inverted tag sensor that is always incontact with a tag on the players sackbot.
2011-03-04 19:37:00

Author:
CENTURION24
Posts: 266


There's nothing that really carries player data in that entire chain. Unless the swords are emitted or have their tags activated by a controllinator, that tag won't carry ownership.

I suppose one way is to sense which player killed you and emit a tag based on that. Each player could have a tag sensor looking for their specific "confirmed kill" tag, from there you'd AND that with the player's controllinator "ACTIVE" input, and that into a score giver. ... that would surefire give points to the right person

I see solutions like this as a bit inelegant though, but score givers are a pain in some circumstances, especially when the ownership data is limited like in sackbots. But the remote controlled controllinator always carries the ownership data.
2011-03-04 19:43:00

Author:
Foofles
Posts: 2278


The receiving part to that chain is on the players (that should get the points) controlinater. The lightsabers are being emitted along with everything else but the players controlinater. The tags on the sabers are being activated by the player.2011-03-04 20:57:00

Author:
CENTURION24
Posts: 266


What I did for my level was use a tag sensor on the thing that gets killed connected to a score giver (mine is a collectable not a player, but the concept is similar). The tag sensor is looking for a tag the player sackbot holds. What you could probably do for your bots. Is have when the Player health reach zero. Have it look for tag sensors that the other sackbots (and weapons/attacks they give/throw) hold and connect this to a score giver. I don't know if putting them all to an OR will work. You might have to put a timer (about 0.1-0.3 seconds) before the Sackbot actually dies so it could actually sense these tags and give the appropriate points.

That's basically exactly what I did and it should work fine for you. The OR gate has a bit of a quirk (more on that in a second), but it works. The important thing is to make sure that the tag on the killer is being activated by a player data carrying input--the easiest is a controllinator output (such as whatever button you push to turn on your saber).


I suppose one way is to sense which player killed you and emit a tag based on that. Each player could have a tag sensor looking for their specific "confirmed kill" tag, from there you'd AND that with the player's controllinator "ACTIVE" input, and that into a score giver. ... that would surefire give points to the right person

I would think that would be the most reliable solution. As I said, I put the score giver on the bot getting killed and set it to react to a tag on the bot that killed it. Unfortunately, while this should work in theory, it glitches occasionally and the dying player will sometimes get the points that should have gone to the guy who killed him. If you put the score giver on the player who does the killing, it should be much easier to rig it so that it only gives points to that player so there won't be any glitchiness.

If I were to adapt Foofles' method to my lightsabers, I would set it so that if a player is killed by a saber with a particular colored tag (all my sabers use the same "saber" label on their tags, but each player has a different colored tag), it briefly turns on a tag of the same color with a label like "you killed me" or something. When a bot detects it's own color of a "you killed me" tag, it would trigger its own individual score giver that theoretically shouldn't be able to award points to any player other than the right one. As Foofles said, it's not as elegant, but it's almost certainly more reliable.

As to the quirkiness of OR's I mentioned with score givers, OR's and AND's work, but they prioritize the input closest to the top of the gate. In theory, this shouldn't be a problem--if an OR has a red, blue, yellow, and green tag sensor wired into it in that order, the red should take priority, but if only one is triggered, that one should receive the points every time. In practice, though, it seems to be a bit glitchy. Sometimes in my level, the player who dies will get the score and even more occasionally, the score will be black, indicating that it didn't get awarded to anybody. I figure this has something to do with the OR gate not being completely reliable which is why I'm endorsing Foofles' suggestion. ANDs work the same as ORs--that is the top input takes priority--but in their case, as far as player data goes, the top input is the only one that matters. I tried hooking a player data carrying signal into the bottom input of an AND and a non-player signal into the top and it didn't work--only the top input works for player data.
2011-03-08 18:18:00

Author:
Sehven
Posts: 2188


Emitting the tag worked!! Tyvm all2011-03-08 23:19:00

Author:
CENTURION24
Posts: 266


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.