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

very confused with score givers, impact sensors, and sackbots

Archive: 6 posts


I am having a lot of trouble attempting to get my weapons in my death match level to award points properly. I have tried everything, and so I need help from someone who understands score givers, sackbots (specifically their hitboxes) and impact sensors.

So, the problem is that the weapons within my death match are supposed to award points whenever the player using them attacks and kills another player with one of them. For players to kill other players with weapons, they need to press a button on the controller (different controls per weapon) which will cause the weapon to protrude or lethalize in the case of melee weapons, and fire shots in the case of guns and projectile-based weapons. All the weapons properly respond to button presses, so this is not the issue clearly. The problem has to do with the hit detection while a melee weapon is lethal, and on projectiles from guns. Whenever the sackbot a player is controlling gets hit with any lethal part of any weapon or projectile, the lethal part theoretically should pick up that impact from the sackbot via one of 3 impact sensors set to require tags assigned to the 3 players not controlling the weapon that the lethal part belongs to, or the gun that lethal object was fired from.

If the impact sensor does detect any of the 3 valid player tags, it then takes that signal into a counter which is set to a target count of 1. This counter then turns on a timer set to 1.3 seconds. The timer is designated to check whether or not the player who hit the lethal part or projectile has been killed. If 1.3 seconds have not passed since the impact, and the weapon detects a tag from the from the sackbot spawn point, called a kill tag, it will know that the player whom impacted the weapon has been killed, since the spawn point turns on a corresponding kill tag whenever it spawns a new bot. When the weapon picks up the signal from the kill tag, the weapon then activates a points tag which corresponds to the player who is using the weapon that was used to kill the other player. That points tag is picked by the sackbot that the player using the weapon is controlling, and causes an emitter to fire one specialized point box. The point box is a hologram with a with microchip detecting the player whose weapon killed the other player. The points box detects the player using the weapon, and gives the player 10 points via a score giver.

This setup should work in theory, and sometimes works in practice, but it is far from picking up everything. Sometimes it's as bad as not activating the impact sensors, yet still killing enemy players. Of course, this means it will not work at all in that case. sometimes, I will kill an enemy player, the impact sensor will activation the counter, the counter activates the timer, and the points tag on the weapon turns on, but not points box is emitted out of the weapon user's sackbot.

I have tried other methods, like having a simpler system without a timer, but instead of the timer, just check for an impact, and if one occurred on a lethal part of a weapon, emit a points box out of the sackbot controlling the weapon. I had found that even if the player who got hit did not get killed, the player who hit them with their weapon would still get points occasionally.

I had to opt for using the timer method described earlier. The timer is set to be as long it takes for LBP2 to figure out a sackbot is dead, which according to my testing is 1.3 seconds after a lethal impact has occurred.

All I need is a simple way to reward points for killing other players. It's as if I either do not understand where a sackbot's hitbox is, and maybe I'm not always hitting the hitbox (even if they die), or the timer is set to the wrong target time, or the score giver on the points box has some weird timing, where, even though I've set it to emit once with no multiplier, it still operates on some weird scoring interval, and it can't give me points constantly.

How can I possibly make this set up for rewarding points for killing others 100% reliable, and stop missing the occasional kill?
2012-02-06 08:50:00

Author:
TheLawnStink
Posts: 98


I have now simplified the system to not use timers, and have found 3 possible failure scenarios.

1) the player who gets killed by the weapon does not have his sackbot's player tag detected by the weapon head (the lethal part)

2) the player is hit with the lethal weapon head, the impact sensor detects the player, but the player wasn't killed, and points are rewarded to the player controlling the weapon regardless of not killing the player that they had hit

3) a player is hit with the weapon, the weapon head detects the player's tag, the points tag for the player controlling the weapon turns on, but no point box is emitted

Right now, it seems like impact sensors are very bad with detecting when a sackbot is hit with a lethal blow whether that strike be fire, electric, gas, plasma, or spikes.

is there any other way of getting weapon kills to award points via impact sensors, or should I try some other kind of sensor to accomplish this? Additionally, if I am to opt for a non-impact sensor solution, what are some ways to do it?
2012-02-07 08:05:00

Author:
TheLawnStink
Posts: 98


I think Sackbots have multiple hitboxes, which is why you can do things like balance physical objects on their shoulders. If you wanted to make a hitbox that is guaranteed to work you could make a box of holo follow each Sackbot (or just bolt it) and place your impact sensors on that.

This is just a guess, but the impact sensors not working as intended may have to do with the speed of the projectiles or weapons. If the Sackbot head hitbox is 3 small grid squares big then a projectile with a mover set to anything over 22.5 speed shouldn't, depending on the distance between them and the size of the projectile, activate an impact sensor on the Sackbot. To the console the projectile was on one side of the head for 1 frame, and on the other side of the head in the next frame, resulting in no detectable collision.

It may also be that the Sackbot and the associated electronics is being destroyed before it has a chance to do its job, but it shouldn't take much more than 0.06 seconds let alone 1.3 seconds.
2012-02-07 14:24:00

Author:
Ayneh
Posts: 2454


That seems to make sense. There probably isn't a frame in which impact is made in my tests. The weapon That I have been using for the tests is a burning saw that spins in what ever direction you press on the right analog stick. The blade of the weapon is always rotating, but if you press left or right on the right analog stick, it activates an advanced rotator for 1.0 second which is located on the weapon's handle (roughly 3 big grid squares away from the blade) causing the weapon to rotate around the user. During the rotation, the weapon is lethalized with fire, and will accept impact from player sackbots via the P1, P2, P3, and P4 tagged impact sensors. The culprit seems to be the rotation speed on the advanced rotator, which 1500, so as you had suggested, if a weapon or projectile moves too fast past a sackbot for that sackbot's impact sensor to activate in a logic frame, given the hit box on the bot's head may only be 3 small grid squares. So this saw weapon is likely not activating the impact sensor on the sackbot, if the saw is right next to the sackbot's head prior to pressing left or right on the right stick to attack.

Given some tests that I have done on sackbots, it seems accurate to suggest that sackbots have multiple hitboxes. One test involved moving metal plates towards a sackbot that had an anti gravity device with 100% dampening on it. The plates were two big grid squares wide, and four big squares long. The plates had microchips on them containing, a gyroscope, an impact sensor, a mover at a speed of 0.1, a counter with a target count of 1, and an anti-gravity device with 100% dampening on it. When the plates hit the sackbot, the impact sensor would increment, thus activating the anti-gravity device with the dampening. I tested the left bound, right bound, top bound and bottom bound of the bot, and found that I could near-crush the sackbot before the plates impact sensors would detect the sackbot, and the resulting hit box was about 2.5 small grid squares squared.

Results were much different when I lethalized the plates. I kept the microchips and the settings of everything on them the same. In the test, I found that the sackbot was dying from the lethal plates hitting, but prior to the impact sensors activating, thus, the dampening on the anti-grav never turned on, and the plates kept moving. This happened in all four directions in the test.

As for sackbots being counted as dead within 0.06 seconds, I will need a different test for that. I had tested sackbots for kill detection using a timer, a tag sensor set to the same tag as the sackbot with a radius of 5000, an alarm horn sound which were all connected to the sackbot's follower hologram, and for the mechanism to kill the bot, I used a hologram with a danger tweaker which was activated via a grab sensor on a sponge. on the sackbot's follower player, using an and gate, I tested if I was grabbing the sponge with the grab sensor, and whether or not the bot was making impact with the hologram. The and gate activated a counter with a target of 1, with the counter's output going into the timer. once the sackbot's tag was no longer detected on the tag sensor, the tag sensor would reset the counter, thus turning off the timer. When the timer had turned off, I had found that the current time was 1.3 seconds. That is where is I get the 1.3 seconds. However, it does seem a bit high.
2012-02-07 18:12:00

Author:
TheLawnStink
Posts: 98


One thing I recommend, is not using the lethality to kill a sackbot outright. I would recommend using tags and destroyers instead. You can use a tag per player, and that way, when you a sakbot is hit, you can determine who hit it. Set an appropriate impact sensor on the holo Anyeh mentioned to give the score. Also, send a signal through a tag to the sackbot, telling it to be destroyed, but put it through a timer first, 0.1s being enough, so that the score giver has time to work. Alternatively, you could potentially lethalize the holo for a moment with a pulser if you want a specific lethal type death. If this doesn't work, it may require a selector and a touch more logic.

To still get a lethal effect on the weapons, you could use some holo or sticker panel. There may also be a way for something to appear lethal, but unable to kill a player/sackbot. I'm not entirely sure on that one.
2012-02-08 08:17:00

Author:
SuddenEnigma
Posts: 70


that idea with the lethalized holo is what I've opted for. I just simply took the follower holos, turned them into circles, and, as you suggested, added danger tweakers. I tested it, and it's giving me points for kills consistently. The system I have now just works on 'electric', 'fire', 'plasma', and 'gas' tags. When the holo detects one of the these tags, and the player tag in which the holo follower is following is within range, the holo lethalizes for a split second, thus killing the the player.

On the weapon end, it picks up the corresponding 'kill box' tag (e.g. if player 1 was hit, the weapon picks up a P1_Kill tag from the holo around player 1). After picking up the tag, it powers the points tag for the player controlling the weapon, that player emits a points box, and the player gets points. YAY!
2012-02-08 21:54:00

Author:
TheLawnStink
Posts: 98


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.