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

Enemy sackbot tutorial request

Archive: 6 posts


I know this may be a lot to ask, but could someone create a tutorial for enemy sackbot logic. Ive been trying to create enemies for a megaman styled game. Id like the enemies to recognize me and attack me with projectiles. For bosses, id like the sackbot to go through a sequence of attacks, and maybe even pull out more advanced attacks once his health gets low. This is the main area im strugglinf with. This is like the last thing i need to finish my level. But i really have trouble setting everything up2011-03-23 07:01:00

Author:
rambo3416
Posts: 179


without knowing more of the specifics of the enemies. (i.e. what are the attacks, the layout of the space where the battles take place) But it would seem to me that the best option would be to act out each of the attacks. Then you will have to set up the conditions you want those attacks to be acted out. Specifically the position of the enemy and the position of the player at the start of the attack. Player sensors to locate the player and tag sensors to determine the position of the enemy and an and gate to select the appropriate attack. With that you can set which recorded attack you want to take place. You may also need to set up transition behaviors to adjust the enemy's position so that its in the right place for the recorded attack to work correctly.

So. using megaman as an example. Mega's on the floor of the level to the left. The enemy is on the floor to the right. You'll need to have sensors set up to register their positions. then have them wired into the specific attack. Let's say the enemy jumps onto a platform and shoots something in the general area of the player. If the player runs under the platform the enemy is on you could then program the enemy so that when these conditions are met the enemy jumps down and then runs to the other side of the room and jumps to another platform.

Sorry if this isn't clear . I'm kinda in a rush. I'lll be on lbp2 later so i'll run a few tests. Ya can add me if ya want. It'll be much easier to work out if I could see the layout of battle area.
2011-03-23 22:25:00

Author:
Chicago51
Posts: 258


I know this may be a lot to ask, but could someone create a tutorial for enemy sackbot logic. Ive been trying to create enemies for a megaman styled game. Id like the enemies to recognize me and attack me with projectiles. For bosses, id like the sackbot to go through a sequence of attacks, and maybe even pull out more advanced attacks once his health gets low. This is the main area im strugglinf with. This is like the last thing i need to finish my level. But i really have trouble setting everything up

Well ok. I'll try.

SACKBOT ENEMIES-
First pop down a basic sackbot. On his basic chip, tweak with the square button. On this menu its all the sackbots basic AI. If you want him to patrol a platform,
set his behavior to PATROL and CAN JUMP to no, Afraid of heights to Yes and IS HOSTILE tol yes. This will make the sackbot wander in a patrol route around the platform. When he reaches one end he'll turn around as he cant fall or jump off the platform. Now, set his detection radius to enough to detect the player when he gets near the sackbot on the platform. This is how you basically set the sackbot to notice the player.

Now, open the sackots base chip, and on it place a projectile sensor attached to a destroyer. Open the tweak options for this projectile sensor and select the type of projectile that will hurt the sackbot. (It works by when this type of projectile hits the sackbot the bar increases by one increment. When the projectile bar is full -and you can set the number of hits -set it to 1 for an instant kill of the sackbot-, it activated the connected destroyer (whick destroys the sackbot).
We'll go with the easiest weapon -the creatinator.Place one on the platform so the sackpot will wander into it. (oh on the sackbots base tweaks, set CAN USE CREATINATOR to yes). Now the sackbot has a weapon to use on you if you come in range.

Now the player. simply make another creatinator helmet somewhere the player can get to. (beside an entrance or checkpoint is a good idea. Now open its tweaks and select the object to emmited to be the same as the object to be sensed by the sackbot- say for example, Thats it. the basicest (if indeed thats a word) combat setup.

You have a helmet that emmits fire- the sackbot has a helmet that emmits fire. when you come in the set range of the sackbots awareness, he will fire at you. and if its a lethalised object (fire,plasma or electricity) it will kill the player. You can do the number of lives at the checkpoint or entrance.
When the player uses his creatinator and fires at the sackbot, for every hit, the sackbots projectile bar increases untill the max hits are reached then he destroys
2011-03-23 23:59:00

Author:
Sean88
Posts: 662


I've said it before and I'll say it again. Selectors do wonders for emulating sackbot AI and decision making. Kinda like the homing missile tutorial. They're perfect for changing behavior when certain parameters are met.2011-03-24 00:13:00

Author:
DigiOps
Posts: 111


I agree DigiOps. Selectors are really powerful tools. Good suggestion mate 2011-03-24 00:43:00

Author:
Sean88
Posts: 662


I made a lil demo to test out the sensors idea i mentioned above and it worked out well. I also ended up using selectors to pick between a couple different attack animations based on the locations of the enemy and player.It adds a nice bit of variation in the attacks.2011-03-24 15:32:00

Author:
Chicago51
Posts: 258


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.