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

Counting the number of objects?

Archive: 4 posts


Hey everyone.

I want to count the number of objects with a particular tag in the level, without having an obscenely large amount of tag sensors and such.

I am looking for a solution to this, because it's part of an economy system I am thinking about: for each farm that belongs to a particular player, add 1 credit to that person's available funds.

I currently have no logic or objects to show mainly because I'm still thinking about how this should work. It seems infeasible to loop through every object with a particular tag and count them within a single frame. =/
2011-04-04 19:52:00

Author:
Unknown User


If the farms are to be added/purchased one at a time, then you can just use counters. just add or subtract to it using +/- signals.2011-04-04 21:06:00

Author:
tdarb
Posts: 689


You could put a tag on the farm, then have a series of tag sensors that require a different number of tags to activate. For example, tag sensor 1 requires 1 tag to activate, tag sensor 2 requires 2, etc. Depending on how many objects you plan on allowing in the level at max, this might be an easy solution to the problem.2011-04-04 21:13:00

Author:
Morgana25
Posts: 5983


If the farms are to be added/purchased one at a time, then you can just use counters. just add or subtract to it using +/- signals.

Derp. I don't know why I didn't think of this before.


You could put a tag on the farm, then have a series of tag sensors that require a different number of tags to activate. For example, tag sensor 1 requires 1 tag to activate, tag sensor 2 requires 2, etc. Depending on how many objects you plan on allowing in the level at max, this might be an easy solution to the problem.

I had initially thought of this before, but I guess I should have clarified the part with the obscenely large amount of tag sensors. Thanks for trying though.
2011-04-05 03:32:00

Author:
Unknown User


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.