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

Make emitted object follow the player who emitted it

Archive: 4 posts


I need to set up a broadcast chip with an emitter. It will broadcast to sackboy so that he will emit an object. That object will need to follow him and him alone throughout the level regardless of how many players there are. Each player will have the same object emit and each of theirs will need to be paired to them. A normal follower cannot be used as it will always follow whichever sackboy is closest, not necessarily the one who emitted it. Aside from that, each of these objects will need to be able to damage any player they come in contact with other than the one who emitted it.

What I've got so far:
I've created a chip that runs off a randomizer to activate one of four tags. It then checks to see if there are any other tags of the same type activated and, if not, deactivates the randomizer. If another of the same tag is detected, it will continue to randomly select tags until it selects one that is not otherwise detected. Using this logic, four of the same chip can spawn at the exact same time and within about 3-4 seconds, each will be assigned their own tag. Once the chip determines its tag is unique, it will count a .5 sec timer, after which it will permanently disable any changes to its tag. After several tests, this seems to work and each of my four test objects (my sackboy and three cardboard boxes I'm using as standins) have been assigned unique tags each time.

My question is, is this the best way to do this? Is there a simpler way to make a follower belong to a certain player?
2014-11-26 08:31:00

Author:
Sehven
Posts: 2188


Why not attach the object to the player and turn it on and off?

- - - - - - - - - -

Oh I didn't catch that you where using sackboy, I barely use sackboy myself in my levels... nevermind then.

- - - - - - - - - -

Though for your problem I would use somerhing similar to what you already have done.
2014-11-26 10:22:00

Author:
Willman4
Posts: 170


I think the solution you are looking for is in the broadcast chip, but I'd need to be at my system to figure out more.

Is there an option to broadcast to specific players from the chip?

- - - - - - - - - -




Oh I didn't catch that you where using sackboy, I barely use sackboy myself in my levels... nevermind then.


You know with the new broadcast chip you can put logic directly on sackboy, right?
2014-11-26 14:09:00

Author:
Biv
Posts: 734


I think the solution you are looking for is in the broadcast chip, but I'd need to be at my system to figure out more.

Is there an option to broadcast to specific players from the chip?

- - - - - - - - - -



You know with the new broadcast chip you can put logic directly on sackboy, right?

Yes, I know the broadcast chip. That's exactly what I was talking about
And no, I don't think there's a way to set it to broadcast to specific players. I think there's a Lead Player/All Players option but no Player1/Player2/Player3/Player4 option. If there is, I'm going to feel really stupid for going to the trouble of programming this chip.

It seems my method works but it takes 1-4 seconds to lock in on unique tags for each player (if any two players have the same tag, they both switch to new ones, which means they'll overlap with at least one of the other two players on the next round. Essentially it's rolling 4 4-sided dice over and over until they each come up with different numbers. I can probably speed it up by increasing the number of tags available (more options = less chance of overlap), but that means adding extra sensors and followers to the objects they carry, complicating the logic further. The nice thing is that once the players are locked in, they stay that way... presumably until they die. Then they'll go through the process again, but with the other three players already locked in, it'll take less than a second to lock in on the remaining possibility. I'm also worried about all these randomizers causing a game divergence.
2014-11-26 14:24:00

Author:
Sehven
Posts: 2188


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.