Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Sackbot spawn logic
Archive: 9 posts
I'm working on a vs. arena style thing. Players control sackbots and they can spawn from one of four locations. The last time I did this, I placed emitters at each location to emit the bots, but with 4X4 player bots + 2X4 for 2 additional spawn points during the boss fight, and 3X4 for enemy bots, the thermometer behaved as if it were possible to 36 bots running around with 60 weapons. Not very efficient. This time, I've placed the emitters on the bots' followers and placed randomly activated tags to guide the followers to the spawn points. Works pretty well although it seems to lag a bit when it comes time to emit. I need them to emit in precisely the right spot and I guess it takes a few seconds for the follower to really get comfortable or something because, despite the 0.2s timer attached to the emitter and its 0.0 emit time, it often takes 3-4s before it finally emits. So that's one problem: dunno' why it happens and it mostly looks like the followers move right into place and hold still, but I have seen them dance a bit. There's probably a really simple way to make a follower stick precisely in a location, but so far, I've had little luck finding it (doubling the follower's speed didn't seem to help). The other problem is the randomizer logic. At first I just had it set to randomly spawn the players/enemies wherever and that worked fine, but it would often spawn two players or a player and an enemy bot in the same place, leading to cheap kills. So now I'm trying to add in logic to disable any spawn point that has a player or enemy bot too close to it, which sounds like it should be easy, but it just isn't working. Sometimes a player or enemy will get stuck unspawned for some reason and other times the player's bot follower seems to get jerked around between the different spawn points that can't make up their mind. Edit: solved Rather than go into the logic I'm using, I'm just going to assume it's fundamentally flawed and ask if anybody has successfully implemented a similar system, and, if so, how did you get it to work? Both of my problems seems like they should be super bonehead-simple to solve but I just can't seem to manage it (though, to be fair, I was exhausted when I was working on it and haven't taken another crack since I got up today, so maybe I'll be able to figure it out with a rested set of eyes). | 2013-03-31 19:09:00 Author: Sehven Posts: 2188 |
I need them to emit in precisely the right spot and I guess it takes a few seconds for the follower to really get comfortable or something because, despite the 0.2s timer attached to the emitter and its 0.0 emit time, it often takes 3-4s before it finally emits. So that's one problem: dunno' why it happens and it mostly looks like the followers move right into place and hold still, but I have seen them dance a bit. There's probably a really simple way to make a follower stick precisely in a location, but so far, I've had little luck finding it (doubling the follower's speed didn't seem to help). The delayed spawn time is an issue of mine too. It's very annoying and it really ruins the pace in the game. Anyway... It looks like you have gotten yourself a challenge, this seems pretty complicated I hope there are a logic head or two that can help you out* -- Jauw *I'm not in create mode atm. If I were; I would definitely try to find a solution | 2013-03-31 22:46:00 Author: Jauw Posts: 484 |
I solved the issue where it gets stuck. It was painfully simple: I just couldn't see it at 3 am last night :-D Still having a problem with the delay and it's bad enough that even though it will only spawn you in a place with no other players/bots present, they'll sometimes have moved to your location before your bot actually spawns and they'll get the drop on you (they use the follow behavior to track players rather than the bots), so if anybody has had this problem and solved it, any advice you have would be much appreciated. I can't loosen up the detection range for spawning, unfortunately, because the bots have to spawn into tight spaces. | 2013-04-01 01:21:00 Author: Sehven Posts: 2188 |
i believe most sackbot spawning issues come down to the fact part of the bot remains long after the bot is destroyed, when testing in create mode you will often hear this part break as it leaves the level boundaries. this means that if you set your emitter to a max of 1, and "destroy oldest when max is reached" set to no, then the emitter will wait for the remaining part of the bot to exit the level and break b4 emitting the new one. good news is that simply changing it to "yes" should fix your problem. assuming of course you have a sensor that stops the emitter from trying to emit when a bot is present | 2013-04-01 05:10:00 Author: evret Posts: 612 |
I had this same problem several months ago on a level I made. The sackbot was complex with lots of sensors and other stuff. When it died and went to the spawn point I had to wait sometimes up to 10 secs for the bit to emit. I didn't actually figure out exactly how to fix it. I was fooling around with things and suddenly I only had to wait around a sec. I don't know what your logic is but I used the same set up as comphermc in one of his tutorials. I adjusted it slightly to better fit my level, but here's the end result. A hologram with the controlinator follows the bot. Using sensors it activates my own made checkpoints. When I die the follower shoots to the last checkpoint activated. I tested it with activating the first checkpoint and dieing at the end and had no problems. On my checkpoint I have my sensors set up so when the follower is in front of it but no bot, a new one will emit. I have two tag sensors one for the player and one for the controlinator on the checkpoint hooked to a and gate. Once their both active it activates a sequencer that activates a few things I needed (refill health and a sound) and also the emitter. The sequencer is set up with only 2 bars. The emitter at the start of the second bar. The sequencer is set as, start playing forward. No to loop. And lastly 1 sec per stripe. The emitter is set as ignore parent velocity, emit once, frequency 1 sec, lifetime infinite, sync 0, max emitted infinite, and destroy oldest when max reached at no. I tired doing it all without the sequencer but it never worked. That was my set up when it finally started working. I'm not sure if you need it the same or not. I know that's a lot and it might be confusing. If you want to actually see it send me a message on psn (same name as on here) and ill show you. If you have any questions just message me. Other than that I hope this helped | 2013-04-01 07:03:00 Author: Dfw86 Posts: 138 |
Awesome! It worked a little too well in fact! Had to change the emitter frequency to .1s and I'll have to add a speed sensor to the follower to tell it not to emit before it's holding still. I think I might just have to start pm'ing you when I have a problem, Evret. You keep having the perfect answer! On a side note, I think you might've fixed another problem I was having. I'm using attract-o-tweakers on my bots. They're Jedi and the attract is the force pull, and then I used more attract-o-tweakers to add a visual cue to the force push power. After a while in testing or in play mode, the visual effects would stop working. Doesn't seem to be happening any more, so I'm guessing that fully destroying the old bots is fixing the problem. I had no idea that a destroyer didn't completely eliminate a sackbot! Edit: turns out I was wrong about the attract vfx. Guess it's a separate issue. If I can't crack it, I guess I'll be starting a new thread for that too | 2013-04-01 07:26:00 Author: Sehven Posts: 2188 |
I'll have to add a speed sensor to the follower to tell it not to emit before it's holding still. I think I might just have to start pm'ing you when I have a problem, Evret. But this way other people have a chance to learn as well. By the way, setting the emitter to ignore parent velocity doesn't help? Or does the positioning need to be that accurate, that it must settle down first? Just curious. | 2013-04-01 11:37:00 Author: Rogar Posts: 2284 |
But this way other people have a chance to learn as well. I was joking Or does the positioning need to be that accurate, that it must settle down first? Just curious. Yeah, it's emitting the bot into a small space. The bot lands on a bounce pad and gets launched into the fray. Turned out to not be a problem, though: just needed to up the emitter's frequency to .2s to keep it from over-doing it. Also, my off topic problem with the attract-o-tweakers--I think I solved it. Googled it and somebody mentioned that the vfx wouldn't work unless he put some actual attract-o-gel in the level, so I tried that and I haven't noticed the vfx stop working since. It doesn't even have to be visible: I shoved it behind some of the scenery in my level and it still works fine. | 2013-04-01 13:57:00 Author: Sehven Posts: 2188 |
@Dfw86: That's exactly what I did for my "The Heart of Kahzithulu - Otherworldy Platformer" level! Great minds think alike, I say! | 2013-04-04 00:36:00 Author: Buttarms Posts: 142 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.