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

Projectiles and Scoring? Linking a player to their projectile

Archive: 4 posts


I was hoping someone could offer a quick method on how to link a player to their damage caused from projectiles (in a top-down shooter), or just confirm I'm doing this correctly.

Several players may be shooting the same enemy, and it takes several shots to destroy an enemy. I have impacts triggered by impact sensors which link to a timer, which when it reaches zero, destroys the unit and gives score.

I imagine emitted objects have the player information from the ones that emit it (in this case, player X holds one of the four trigger buttons to activate a timer which activates the emitter). The impact would then send the player information to the sensor, which then ANDS with a timer to produce an analog signal. This then decreases a timer speed-scale until it reaches zero, which then travels to a sequencer detecting the loss of signal (battery to NOT), and activates the score an destroyers.

That last step is my concern. Does the battery in the sequencer carry the player information of the input of the sequencer, or did it even get that far?

Thanks.
2011-06-08 03:52:00

Author:
SSTAGG1
Posts: 1136


It most likely does not, since it's disconnected from the flow of the logic. Even though the player is ultimately activating the sequencer, which activates the battery, which activates the NOT, I'm not sure if the game will pass the info from the sequencer to the battery... in fact I'm pretty sure it doesn't.

Maybe put the score giver on the sequencer if it's set to positional? This way when it runs down, the player who last changed the position should get the points... I think... Scoring in this game is tricky.

Good luck to you.
2011-06-08 07:21:00

Author:
shane_danger
Posts: 283


In one of the revisions of the shooting logic of the vertical shooter I am working on I lost player data as well. I have the extra handicap of having it known at the central cpu that deals out scores. What I did was set a player sensor with a very small radius directly on top of the player's DCS and fed that into a tag. The central CPU picked up this tag with a sensor and fed that signal carrying the player data into an AND gate where also the scoring events passed through.

Maybe in your setup the scoring logic is already on the DCS or you could do with a wire instead of using a tag for inter-CPU communications, but the principle remains the same. This method will not work for a multiplayer environment, though, when it matters exactly who shot the target: in that case, if you are certain that the projectile fired contains player data that just got lost in the post-hit logic, you can take another wire from the impact sensor up there and feed it into an AND gate combined with the processed impact signal; there may be latency issues in which the processed signal is delayed (and thus the AND gate not fired), but that is a whole other problem.

In case of your enemy's timed death, I reckon you can store the last impact (and its player data) into a 1-shot counter and lead that into an AND gate. If you have the impact sensor reset that counter and delay the signal slightly before it sets the counter, then the data of the last player who shot the enemy gets stored.
2011-06-08 07:33:00

Author:
Antikris
Posts: 1340


I can tell this is going to likely become more complicated than I initially hope for.

I'm fairly certain now that the projectiles do not have player data, no matter though, since I have another method planned now.

I created my own 'scoring' system to account for each faction's economy in my level. If I link whichever faction destroyed the unit to the score system (which I have to do anyway), I could then easily trigger player scores from that. Key on unit activates Faction X's score, which also triggers a score change for whichever players chose that faction.

My plan is to put an impact sensor for each faction's attacks, put that to a selector (since I don't want to lose the pulse from the impact) which goes to an AND along with the death trigger. Then it simply becomes a matter of triggering the tag before the unit disappears. The score system will detect which faction killed the unit and pulse the change to that score and to players that chose that faction.

Hopefully that'll work, since that's pretty much just an additional 3 impacts sensors (3 enemy factions, 4 total), a selector, an AND, and a key on each unit.
2011-06-08 07:52:00

Author:
SSTAGG1
Posts: 1136


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.