Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
How to make a health Bar and a shooting turret?
Archive: 6 posts
So im planning on making a level where your are on a small ship pointing up with turrets shooting at you from the top of the map, but I don't know how to make health bar for the ships or how to make a shooting turret. If you know, please reply. | 2011-02-27 15:22:00 Author: DominationMags Posts: 1840 |
I guess from the question that you'd prefer simple solutions, so: For the health bar, use a counter. Place it where the player can see it, and make it so that the output is inverted and that its visibility is set to 'on'. Set the maximum count to the amount of HP you want to give, and leave the current count on 0. Whenever the ship gets hit, you'll increment the counter. On the logic side you are counting the number of times the ship gets hit, but with the counter inverted, the bar will look like it's decreasing. To detect a hit, use a projectile sensor. Wire the sensor to the input of the counter. Everytime the ship is hit by projectiles, the counter will go up and the health bar will go down. You can choose a good 'I got hit' sound from the sounds section and wire the projectile sensor to that as well. Place a NOT gate, and wire the output of the health-bar counter to it. Attach the output of the NOT gate to a sequencer. Open the sequencer and put on it the things you want to happen when the ship runs out of HP. You can change the music or play sounds, take some points away from the player, and use a destroyer to blow up the ship. For the turrets: Build the physical turret in two pieces: the base and the turret itself. Bolt the turret to the base. On the turret place a microchip. Place a 'look at' rotator on the turret with the tiny arrow pointing in the firing direction. Set its range to however far away you want the turret to shoot from. On the microchip place a player sensor. Give it the same range as the 'look at' pointer. Next to the player sensor place an emitter. Choose a projectile, and modify the settings to that it fires at the right speed and frequency. Set the 'max emitted at once' figure to as low as you can without ruining the range of the turret, to save heat. Wire the player sensor into the emitter. The turret will stop firing and only shoot when the player is in range, to save heat. So there's health bars and turrets. The health bars counters have reset inputs that aren't in use. If you send a signal into the reset input it will be like the ship has its health restored. Why don't you try experimenting with it and see if you can make health powerups yourself? It sounds like you are at a creating stage where experimenting with logic will be more educational than taking instructions - but I hope at least you can get something working well enough to experiment with it! | 2011-02-27 16:06:00 Author: munrock2 Posts: 96 |
I guess from the question that you'd prefer simple solutions, so: For the health bar, use a counter. Place it where the player can see it, and make it so that the output is inverted and that its visibility is set to 'on'. Set the maximum count to the amount of HP you want to give, and leave the current count on 0. Whenever the ship gets hit, you'll increment the counter. On the logic side you are counting the number of times the ship gets hit, but with the counter inverted, the bar will look like it's decreasing. To detect a hit, use a projectile sensor. Wire the sensor to the input of the counter. Everytime the ship is hit by projectiles, the counter will go up and the health bar will go down. You can choose a good 'I got hit' sound from the sounds section and wire the projectile sensor to that as well. Place a NOT gate, and wire the output of the health-bar counter to it. Attach the output of the NOT gate to a sequencer. Open the sequencer and put on it the things you want to happen when the ship runs out of HP. You can change the music or play sounds, take some points away from the player, and use a destroyer to blow up the ship. For the turrets: Build the physical turret in two pieces: the base and the turret itself. Bolt the turret to the base. On the turret place a microchip. Place a 'look at' rotator on the turret with the tiny arrow pointing in the firing direction. Set its range to however far away you want the turret to shoot from. On the microchip place a player sensor. Give it the same range as the 'look at' pointer. Next to the player sensor place an emitter. Choose a projectile, and modify the settings to that it fires at the right speed and frequency. Set the 'max emitted at once' figure to as low as you can without ruining the range of the turret, to save heat. Wire the player sensor into the emitter. The turret will stop firing and only shoot when the player is in range, to save heat. So there's health bars and turrets. The health bars counters have reset inputs that aren't in use. If you send a signal into the reset input it will be like the ship has its health restored. Why don't you try experimenting with it and see if you can make health powerups yourself? It sounds like you are at a creating stage where experimenting with logic will be more educational than taking instructions - but I hope at least you can get something working well enough to experiment with it! any ideas on how to make the health bar move with the ships as they go along? | 2011-02-27 17:17:00 Author: DominationMags Posts: 1840 |
Put the counter on some invisible hologram and glue the holo to the ship. | 2011-02-27 21:18:00 Author: cheesemuffins99 Posts: 102 |
Put the counter on some invisible hologram and glue the holo to the ship. thanks! | 2011-02-27 23:19:00 Author: DominationMags Posts: 1840 |
Or use a follower on hologram. | 2011-02-28 02:52:00 Author: Bbody Posts: 43 |
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.