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

Destroy an Enemy And Emit A New One

Archive: 4 posts


I'm currently creating a platform level that takes place in a sewer. In this sewer, I want creatures jumping out of the water and start firing projectiles at me. I want to emit a new creature everytime one gets killed. So, I guess you can say, there are a countless number of these creatures, and if you wanted to, you could just fight them for however long you want to. They're meant to be an obstacle more than something you have to destroy to proceed.

The object is, as I approach, a creatures jumps out of the green sewer water. After I defeat him, a new one is emitted. I don't want to keep emitting them after so many seconds, because my level will be over run with these creatures. Any suggestions?
2011-03-12 04:46:00

Author:
rambo3416
Posts: 179


Link a player sensor and a tag sensor to a AND gate, and this gate to an emitter. Set the emitter to one-shot. Put a tag with the same label on the monster. Set the tag sensor to inverted output. Set the range correctly. Now if there is no monster and you enter the player sensor radius, a monster appears. Since there is a tag on the monster, the emitter stops receiving a signal. As soon as you kill the monster, since you are still in the trigger radius and there is no more tag, another creature appears. Again, again... And the emitter is set to one at the time. If the monster can move far away, you can uncheck the detroy previous setting of the emitter. Even if the monster leaves the tag sensor range, there won't be a new monster as there can only be one. If you check the option, a new monster will appear and the first one will die.2011-03-12 05:18:00

Author:
Unknown User


Wow!! Great! I'll apply this ASAP. Thanks. I assume that I should set the emitter so that the enemy lasts for an infinite amount of time? Do you also know to do virtually the same thing but stop emitting new creatures after I kill a certain amount of them? say 10 of them?2011-03-12 06:38:00

Author:
rambo3416
Posts: 179


you could probably get by with just a player sensor and emitter.

Do you really need all the tags? couldn't you just set the emitted object to infinite lifetime, max of 1 emitted at once, and not to destroy when max emitted at once limit is reached? That should take care of only having one out, and a new one once it dies.

Just set the total max emitted to 10 to limit how many will be emitted before the emitter stops.
2011-03-12 07:12:00

Author:
tdarb
Posts: 689


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.