Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Advise for avd programming counter
Archive: 11 posts
Hi guys, I am working on a lvl in which two opposing players can capture a nutural base, and capture each others bases. They capture the bases by dropping x amount of tags in a box. For each tag dropped in, a light will indicate one of a players tags are added, for each tag another light. The reason a tag counter won't work is it is imperative the tags are destroyed as they are added. Additionally when player drops tags in the other players base the other players tags must be removed as the capping players tags go up. What I have currently is 10 batteries, 5 +20 ( player 1) and 5 -20 (player 2)output. Going into a positional sequencer with batteries on the seq to keep track of the position. This part I have figured out pretty well ? My quandary is how to count one tag at a time. So when a tag is added 3 times(each tag is destroyed) it raises by x Also I am currently using for my math a battery and counter under a or gate for each point of base capture. What's te right way to do this? Thanks in advance. Beansly Jones | 2011-06-20 00:09:00 Author: Unknown User |
Have you tried using two different counters, and each time a tag is added, it either adds to their own count or depletes the opposing count depending on who has capture points. You could mirror them side by side on the base, each one a different colour (red/blue?). Just make a requirement that in order to add to own count, there is no enemy count. Simply output the opposing player's counter to a sequencer with a battery covering entire thing connected to a NOT, which connects to an AND along with the tag sensor (IMO, an impact sensor with tag requirement may be better, since the tags are being destroyed). It bypasses the entire need for analog values, and should be quite a bit simpler than your current method. Since you can't decrease a counter below zero, you don't need to make any additional logic for depleting capture points. Just use a direction combiner to set the positive and negative inputs. If you need any more help with that, just add my PSN and I'll join you next time we're both on (prob not for a few days though). | 2011-06-20 00:41:00 Author: SSTAGG1 Posts: 1136 |
Thank you for the quick response and intrist. The capture system I envisioned would count one color down as the other went up. I.e. Red has 5 lights of five and owns base 1. Blue currently has no control. Blue drops 2'tags in and lowers reds count to 3 while blues lights up 2. Blue adds a third tag which is destroyed as all others thus lowers reds lights to 2. Blue adds the final 2 tags which meet the capture condition lighting all blue and no red. Base changes to blu. Afaik you cAnt decrease counters without resetting them. Unless you have 5 separate counters with a max count of one running into a XOR in order. Then I can have reds first light clear blues last light and vise versa. Reds 2nd light clears blues 4th light? And an and gate indicating base capture. I thought there wasn't multiplayer create mode? | 2011-06-20 03:40:00 Author: Unknown User |
Thank you for the quick response and intrist. The capture system I envisioned would count one color down as the other went up. I.e. Red has 5 lights of five and owns base 1. Blue currently has no control. Blue drops 2'tags in and lowers reds count to 3 while blues lights up 2. Blue adds a third tag which is destroyed as all others thus lowers reds lights to 2. Blue adds the final 2 tags which meet the capture condition lighting all blue and no red. Base changes to blu. Afaik you cAnt decrease counters without resetting them. Unless you have 5 separate counters with a max count of one running into a XOR in order. Then I can have reds first light clear blues last light and vise versa. Reds 2nd light clears blues 4th light? And an and gate indicating base capture. You can decrease counters. There's a tool in the pop-it called the direction combiner. If you wire an output to its negative input, it will take away from the counters total. So you'll have the blue tag going into the red base. This will activate the positive side going to the blue counter and the negative side going into the red counter. I thought there wasn't multiplayer create mode? There absolutely is! That's one of the great things about lbp. | 2011-06-20 04:19:00 Author: shane_danger Posts: 283 |
Just use a direction combiner to set the positive and negative inputs. Probably should have made that clearer. You can increment and decrement counters by using the positive and negative inputs on the 'directional combiner'. Since you didn't know that before, you'll likely now have no problem making this work. EDIT: Whoa, didn't even notice shane's post there. | 2011-06-20 04:40:00 Author: SSTAGG1 Posts: 1136 |
Thanks again, directional counters, interesting. Is there a way to output the current percent of the counters? I think its output is only digital on/off. Or would the multiple counters I mentioned earlier work for indicating status of capture AND have a separate 2 counters w/ negative and positive tracking capture.? I haven't been able to get in game last few days,nmy sister is having a baby! Also divergent cameras are implemented in online multiplayer but not splitsreen local right? | 2011-06-20 15:35:00 Author: Unknown User |
Local is all one camera view. And yes, the counters output a digital and analog value. If you've got your counter at 3/5, that's 60% signal. Digital depends on whether it was counted down from 100% (on) or conuted up from 0% (off). | 2011-06-20 15:40:00 Author: SSTAGG1 Posts: 1136 |
I ended up simply using 2 tag sensors via 2 combiners (positive to friendly team and negative to enemy team to remove their cap points.) to a sequencer with stepping batteries to light inclusive base ownership indicator lights. This 8 unit replaced my 50 logic circuits and did a better more efficent job at it. Thanks for sharing knowledge, and to my gf for sayin there had to be a way to check counter analog status. ( sequencer) Now that I have base capture down, my movement down and basic ai with 3 "orders", attack enemy, Attack enemy base and hold position. My next hardest issue for my game is how to "pickup" a unit ingame into a cargo hold. I know I will probley have to destroy the unit on pickup and then re-emmit the unit on deployment.. I was looking at some examples of using a analog memory cell Per player via a hologram affixed controllanator to store the units type,health and supply status on pickup and recall that info when the unit is deployed from the cargo hold. Does that seem the best route to pursue? Additionally how much thermo does ai use ingame? A sample of my ai: my units hAve a push button on the front of them, when the run into something, the button is pressed, and they rotate 90 right move forward for 1 sec, turn back left and try to move again till the button no longer interrupts their follower programming Question is, will this type of logic fill up the thermometer ingame when there are four players? I have tested with just me and spawning 20 units and the thermodynamic is only at five bars. Sounds good so far.? | 2011-06-21 05:40:00 Author: Unknown User |
My next hardest issue for my game is how to "pickup" a unit ingame into a cargo hold. I know I will probley have to destroy the unit on pickup and then re-emmit the unit on deployment.. I was looking at some examples of using a analog memory cell Per player via a hologram affixed controllanator to store the units type,health and supply status on pickup and recall that info when the unit is deployed from the cargo hold. Does that seem the best route to pursue? You're getting pretty advanced there. Rather than try to make the game remember all the information, you may be able to make small, invisible controlinators. This way when the bots get in, they will disappear. It will be as though they are getting into the truck and they'll be out of sight. When you want to redeploy them, you'll just need a way to trigger the eject button on the controlinators so that they will jump out. Sackbots have an annoying habit of always auto-entering a contronlinator... so just be cautious of that. If the seat is not occupied and you don't want a sackbot in it, you need to have an active output hooked to the eject input. | 2011-06-21 06:02:00 Author: shane_danger Posts: 283 |
You're getting pretty advanced there. Rather than try to make the game remember all the information, you may be able to make small, invisible controlinators. This way when the bots get in, they will disappear. It will be as though they are getting into the truck and they'll be out of sight. When you want to redeploy them, you'll just need a way to trigger the eject button on the controlinators so that they will jump out. Sackbots have an annoying habit of always auto-entering a contronlinator... so just be cautious of that. If the seat is not occupied and you don't want a sackbot in it, you need to have an active output hooked to the eject input. That is pretty smart. Never thought of that myself. OP, if you have information that needs to be remembered, don't put its logic on an object that will be destroyed. You can use invisible holo instead, tracking the bot (or whatever object) and communicate information through the use of tags and tag sensors. Of course, with shane's idea you don't need to destroy the bot, but keep this suggestion in mind. | 2011-06-21 07:02:00 Author: Antikris Posts: 1340 |
I have a very simple central counting system that I was planning to make a tutorial of. Gotta make it faster edit: I have uploaded it, maybe it will be useful to the OP. It' does basically what Antikris says, storing info on a safe place using signaling. https://lbpcentral.lbp-hub.com/index.php?t=58626-Centralized-and-deferred-counting-using-circular-signaling&p=872842 Using the circular principle for signaling, you may destroy the counted tags exactly when needed, after you make sure they are counted. It's more ideal than depending on timings etc etc. | 2011-06-21 21:46:00 Author: hesido Posts: 166 |
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.