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

See through walls? Ugh...

Archive: 12 posts


How's everybody doing?

I'm making a stealth level, and I unexpectedly got stuck with this problem. The player controls a sackbot (the enemies are also sackbots). I want to not only be able to put walls in my level (that's right!), but I also want to create some kind of cover system where the player can hide when an enemy is facing their direction.

I Tried to: disable their detection radius, by putting tags on walls, and whenever the enemy looks in that direction (I was using an Impact Sensor on a Sticker Panel for their field of vision), they basically go blind. The obvious problem with this is, when that happens, I can just walk right into their line of sight and they won't see me. Am I missing something here, or is this a bit tricky to pull off? How exactly do I give a priority to what the enemy sackbots see first?
2012-03-22 03:09:00

Author:
ZackBoy
Posts: 65


Did you set it so that the 'blindness' needs cover AND the player using the hide feature? That way they don't just go blind when they look at the cover itself.

Not sure if that was what you meant. Could you be a little more specific? Maybe a few pictures?
2012-03-22 04:42:00

Author:
Speedynutty68
Posts: 1614


This method may not work perfectly, but I have this concept in a project I'm working on.

First, you need a tag on the walls. Secondly, make a field of vision for the guards with sticker panel or hologram and put a tag on it. 3rd, make a very small piece of hologram and put a microchip on it.

On this small piece of hologram, you want it to destroy itself if it impacts with a wall, player, or if it is NOT impacting with the field of vision. This is what the tag on the field of vision was for. Also put a follower on this and make it follow the sackbot/player. Heres the tricky part. You need to find the perfect speed for the follower. If it is too fast, it will go straight through the walls even though you have set it to destroy itself when it hits a wall.

Now set logic on the field of vision and the guard. Basically, when the player walks into a guards vision, this small hologram will emit and follow the player. If it hits a wall, it should destroy itself before it hits the player and it will keep emitting itself until the player is out of view or he walks into view. If there are no obstacles in between, then the dot will hit the player and the guard will be alerted.

I used this for a top down level, so I dont know if it will work for you and the cover system you are trying to work with, but it might help you.
2012-03-22 04:45:00

Author:
DreJ1212
Posts: 240


The cover system is the least important feature, really... I just want the enemy not being able to see the sackbot if there's a wall between both.

@DreJ1212: That does sound a bit complicated. If I were to use a piece of holo with a Follower and set to be destroyed, I'm assuming it would need to be emitted unlimited times. Is that right?
2012-03-22 04:56:00

Author:
ZackBoy
Posts: 65


or have ur sack person hide under a box i think mgs does that 2012-03-22 05:14:00

Author:
WESFUN
Posts: 1336


@DreJ1212: That does sound a bit complicated. If I were to use a piece of holo with a Follower and set to be destroyed, I'm assuming it would need to be emitted unlimited times. Is that right?

Unlimited times yes, just as long as only 1 is emitted at a time. There is probably an easier way to do this, but that is what worked for me.
2012-03-22 05:45:00

Author:
DreJ1212
Posts: 240


The way I would do it (though there's probably a simpler way) would be to divide the field of view into a handful of narrow "slices." Each slice would need a tag sensor keyed to detect walls and another to detect the player's bot. If a slice detects the sackbot and doesn't detect a wall, then he is seen.

That's not enough, though, as you've already noted: if the bot and wall are in the same slice, the sensor won't know the difference between a bot behind or in front of the wall. You'll need to set the sensors to "Closeness" and rig some logic to compare the signals: if the signal from the bot is stronger than the signal from the wall, then it counts as a detection, but if the wall is stronger, he's hidden. You'll probably want three layers of these sensors so that a bot in the front layer isn't considered hidden by a wall in the back layer (that would be silly).

Again, there may be a simpler method, but what I would do is hook the tag sensor for the bot into the positive end of a signal combiner and the sensor for walls into the negative end. Then you'll need to hook the combiner into a splitter. Hook the positive output of the splitter into your detection logic: the end result is that if the negative signal is stronger (the wall is closer), only the negative output of the splitter will carry a signal, which, since it's not hooked to anything, is ignored. If the inverse is true, the positive output carries a signal and the player is detected. You'll need to convert the analog signal into a digital one so that even a 5% signal counts as a detection. I was always a little fuzzy on exactly what percentage a signal needs to be to be considered "ON," so I always used sequencers set to positional with a battery along their entire length to convert analog to digital. Anything from 1-100% will register as a 100% "ON" signal.

[edit] You might be able to get away with skipping the "slices" and still get satisfactory results, but if you want the player to be able to hide behind a smaller obstacle but be detected if he's on top of it you'll need multiple angles of detection.
Also, side note: if you edit your post and click "Go Advanced" it'll let you change the thread title so title typos don't need to be permanent.
2012-03-22 08:03:00

Author:
Sehven
Posts: 2188


Also, side note: if you edit your post and click "Go Advanced" it'll let you change the thread title so title typos don't need to be permanent.

Got it, thanks. I thought of a simple way to do this, I'll try it out to see if it works.

39260
39261
39262

EDIT: I'm such a noob! How do I post the pics so that you can see them directly in my post? Anyway, here's a brief explanation: I wired the blue Tag Sensor (inverted output) to the red Tag. With this the Tag will only light up when the blue Tag is not detected by its respective Tag Sensor. I put this together very quickly, but I think it can work. What do you guys think?

Additional info: Ignore the blank chips. The sackbot in the first image is in the enemy's line of sight. I put the red and blue tags on the holo where the Controllinator is placed. The Sticker Panel (green) is 3 layers long. If you have any questions just ask, I'm not very good at explaining these things.
2012-03-22 16:09:00

Author:
ZackBoy
Posts: 65


Let me know how you're doing. I've recently kicked some life back into a Metal Gear project of my own. 2012-03-22 16:46:00

Author:
Rogar
Posts: 2284


I don't know if anyone had noticed, but I updated my post. I took a break from working on the AI, and will move on to Combat mode. I just would like to know what anyone thinks of this method.2012-03-23 22:26:00

Author:
ZackBoy
Posts: 65


Seems simple. Place player sensors in the hiding spots, set to detect sackboy "on same level: yes", and if he triggers them then they activate a tag. The enemies behaviour chip that is programmed to give chase can be inputed with an inverted tag sensor and a player sensor linked to an AND gate. So, when the player stands within an enemies range....tag not detected: give chase, tag detected: don't give chase.

If you want more precision over the area that your hiding spot will cover, you could alternatively put a thick layer of hologram in the hiding place and place an impact sensor on it to trigger a tag for the same result.

You could also go one further and add a speed sensor to the mix, so that if sackboy is behind a wall but making too much noise with his movements, the enemy "hears" him and gives chase anyway.
2012-03-24 10:20:00

Author:
Ungreth
Posts: 2130


I really liked the Speed sensor idea. Currently, LBP2 is in the backseat for me though, because I got a couple of new games. I do appreciate everyone's input however, and I'll try to post about my level on the Ideas and Projects section (I'm just not very good at decorating and stuff, so I'll need a little help there), after I work a bit more on the gameplay mechanics.2012-03-26 01:29:00

Author:
ZackBoy
Posts: 65


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.