Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Tutorials
#1
Patrol sackbot : how to make a better AI
Archive: 5 posts
Hello LBPC, There is my new tutorial. I would like to show you how to make a better AI for sackbot enemies. So, when the sackbot is watching to the left, he can't see you if you are on the right etc... And he can't shoot on you if you are not in the same layer. http://www.youtube.com/watch?v=hNxVZzsKNW4 | 2013-05-11 17:24:00 Author: Khodex Posts: 42 |
It's Just a shame I don't know French. As I'm sure from what I saw it was a interesting a useful tutorial. ._. | 2013-05-11 17:54:00 Author: Spaceraoul28 Posts: 175 |
@Spaceraoul28 (http://www.lbpcentral.com/forums/member.php?28657-Spaceraoul28), let me translate for... well, for everybody: By default, a patrolling sackbot becomes hostile when he detects a player in its radius, even if that player is behind a wall, on another layer, above a roof or behind the sackbot, which is a problem for most stealth levels. What Khodex did is create a "hitbox" around Norbert (the sackbot). He used a hologram (but an invisible sticker panel works too) of one layer depth, with a follower that follows Norbert. That hitbox has a collision detector, so when the players enters the radius of the hitbox, Norbert's comportment switches to hostile instead of patrolling (the NOT gate in his chip). With this method, Norbert detects the player if he is only on the same layer, but still shoots if the player comes behind him. So Khodex cut the hitbox in two, and instead of one collision detector, he put one on each half in a microchip. Then he put two direction detectors (one detecting when Norbert is facing left, the other when he is facing right), linked to a selector, with each output to the corresponding microchip (left or right part of the hitbox), so when the player enters the hitbox face to Norbert, he is detected, while he remains undetected if he is in the hitbox behind him. It is also said that you can adapt that method so if you don't want Norbert to detect you behind a wall, you can add a tag on that wall, and a tag detector as a second condition for detection, for example. Hope this will help anybody | 2013-05-15 21:58:00 Author: Djibees Posts: 189 |
@Spaceraoul28 (http://www.lbpcentral.com/forums/member.php?28657-Spaceraoul28), let me translate for... well, for everybody: By default, a patrolling sackbot becomes hostile when he detects a player in its radius, even if that player is behind a wall, on another layer, above a roof or behind the sackbot, which is a problem for most stealth levels. What Khodex did is create a "hitbox" around Norbert (the sackbot). He used a hologram (but an invisible sticker panel works too) of one layer depth, with a follower that follows Norbert. That hitbox has a collision detector, so when the players enters the radius of the hitbox, Norbert's comportment switches to hostile instead of patrolling (the NOT gate in his chip). With this method, Norbert detects the player if he is only on the same layer, but still shoots if the player comes behind him. So Khodex cut the hitbox in two, and instead of one collision detector, he put one on each half in a microchip. Then he put two direction detectors (one detecting when Norbert is facing left, the other when he is facing right), linked to a selector, with each output to the corresponding microchip (left or right part of the hitbox), so when the player enters the hitbox face to Norbert, he is detected, while he remains undetected if he is in the hitbox behind him. It is also said that you can adapt that method so if you don't want Norbert to detect you behind a wall, you can add a tag on that wall, and a tag detector as a second condition for detection, for example. Hope this will help anybody Thanks for the translation @Djibees much appreciated now I can give this a go. | 2013-05-17 20:39:00 Author: Spaceraoul28 Posts: 175 |
Great work Khodex! Always wanted to make a awesome patrol sackbot (whit a complex mind), and this was the tutorial right for it! | 2013-05-18 07:39:00 Author: Momoli1344 Posts: 54 |
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.