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

4 players, 4 checkpoints, 4 bots.

Archive: 8 posts


So I'm working on an arena type level. There are four bots which are each tagged in such a way that their attacks can kill each other but not themselves (so there's a P1 bot, P2 bot, P3, bot, and P4 bot). Because of the way they're built, it's absolutely essential for them to have different tags, so I can't just emit four of the same bot.

It's a versus arena with four checkpoints, which means there are four possible places players can appear and when they appear, they'll need to have their bots waiting for them. They can't be remote controlled because I'm using a game camera, not a movie camera, so each player can have their own view.

Now here's my problem: I can't seem to figure out a way to handle the bot emitters when more than one player spawns. With three players spawning at three checkpoints, three bots will spawn at each checkpoint and all three players will end up in P1 bots. I have the emitters set up so that they'll only emit a particular bot if that bot isn't detected anywhere in the arena, but when two or more die at the same time or when the game first starts, none of the bots are detected so the emitters can just go crazy. I need to figure out a way to make it so that only enough bots spawn at a checkpoint for the number of players actually there, and no duplicates spawn anywhere else. Any ideas?
2011-02-08 23:42:00

Author:
Sehven
Posts: 2188


Is it necessary that Sackboy 1 gets P1 bot?
Or is it only necessary that it doesnt exist two (or more) of the same bot?

If it's the latter then it shouldn't be so hard to construct. Though a little complex.
2011-02-08 23:48:00

Author:
Tamland
Posts: 106


is it necessary that the players die and that the sackbots are spawned near them?

I completely circumvented the issue by having my players never die and the entire random spawn mechanism is custom.
2011-02-09 00:01:00

Author:
rtm223
Posts: 6497


http://ia.lbp.me/img/ft/f5aa4c036b59663d0aee54e15259f110ba53da53.jpg
Who need explaining?
2011-02-09 00:04:00

Author:
darkphoenix
Posts: 97


If it's the latter then it shouldn't be so hard to construct. Though a little complex.

It's the latter. The only difference between the bots is that p1 emits a tag that can kill p2, p3, and p4, but doesn't kill p1 and so on. Points are handled by killing the actual player who's riding a follower, and the bots copy player costume and color so they're indistinguishable from each other.

I'm tinkering with something that will compare the number of bots in an area to the number of players detected and only enable the emitters if there are more players than bots, but it's clunky: it requires four tag sensors, four player sensors, and the logic to subtract one from the other. For some reason I thought you could set a tag sensor to require a certain number of keys and get it to output an analog value (so if it's set to require 4 and it only detects 1, it would output a 25% signal), but that doesn't seem to be the case so I had to set up an array of sensors coupled with batteries to get the math working.


is it necessary that the players die and that the sackbots are spawned near them?

Yeah, the sackboys are controlling the bots from followers that they're riding around in and points are awarded for killing the other players.

Now that I think about it, your penguin game worked pretty much exactly like what I'm trying to do. I didn't realize that the players didn't die. Are they ejected from their controllinators and then pulled in via long range auto-enter? That might actually be better than what I'm trying to do.


Who need explaining?

Looks like logic for randomly spawning bots/vehicles that are controlled remotely. I'm not controlling them remotely: I'm spawning the bots right by the players 'cuz I don't want to use a movie camera.
2011-02-09 00:06:00

Author:
Sehven
Posts: 2188


Points are handled by killing the actual player who's riding a follower,

But it makes counting number of players slightly harder. That system I showed will fail with this. And I know that you won't use that system, I said it for info.
2011-02-09 00:19:00

Author:
darkphoenix
Posts: 97


They can't be remote controlled because I'm using a game camera, not a movie camera, so each player can have their own view.

How about the old "put players in invisible controlinator attached to a piece of invisible hologram set to follow Sackbot Tag" trick?
2011-02-09 01:45:00

Author:
Aya042
Posts: 2870


...follow Sackbot Tag" trick?

That's pretty much what I'm already doing, except the follower with the controllinator is the actual weapon (you probably didn't see much of the logic side of things when you were testing it with me earlier). I suppose I could do a separate follower with the controllinator, have it zip real quick over to the corresponding bot when a new one spawns, and award points with a score giver instead of by killing the player. The downside to that idea, though, is that I was thinking of using the same bots/weapons in a non-versus level and if I never actually kill the player, it'll make acing the level meaningless.

Btw, for anybody (besides Aya) who's curious about what I'm using this for:
http://i5.lbp.me/img/ft/9b5fd5b4c7b69662a451dc675863dd39092d9b80.jpg

[edit] The followers and randomizers work great. I'll have to come up with something else if I ever to a campaign type level, but the arena one is all solved now. Thanks for the suggestions.
2011-02-09 02:19: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.