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

Selection

Archive: 11 posts


hi, i am making a to down battle strategy game, and i was wondering how i could do the group selection, so any sackbots inside a selected area would have a switch inside them activated, how would i do this?2011-03-07 19:28:00

Author:
Unknown User


Well that can be tricky.
Actually selecting more sackbots should be easy - just use appropriatelly named Selector to switch between the states "selected"/"not-selected". Based on this state you can activate completelly different microchips with different logic. (so selected bots respond on different buttons from receiver controlinator)

Selecting itself can be tricky. Because Im not sure if it will be easy to do standart "drag a rectangle" style. You will probably have to use some circle area around the curosr (Halo Wars) or group selection as I did for sending group of units in my RTS. When you send a unit it activated a special tag for 0,1sec. And if near unit detected it, it just ativated moving + same tag too. So it spread like a virus on all units that were close together (no matter the actuall size of the group)
2011-03-07 19:55:00

Author:
Agarwel
Posts: 207


i was goig to have a cursor that emitted a peice of holow that attracted a follower on the sackbot's mc, all im having trouble with is the drag-a-rectangle thing as you said. im thinking emitt some peices of holow with a key on it, but i dunno2011-03-07 20:02:00

Author:
Unknown User


Sticking on your original topic, you might need some extra logic than that that's needed. Say, for example, you have a Barracks, and you call in more sackbots, amd you need to select those.

But at the moment, I'd just have a selector selecting the group of sackbots, and all the sackbots are in a linked group. The camera is on a follower which follows your cursor, the selector turns a certain follower on your cursor to an 'ON' state, so your camera follows it. The camera should move slightly slower than the cursor so the cursor is already at the place you're going to.

A group of sackbots are linked via invisible holo and the cursor follows the middle of the group. However the sackbots could have an individual counter for health each and when all counters are at on 'OFF' state the holo goes boom.

Now, to make sure you never just go to a blank space, you'd need some sort of rememberimg system that rememberscwhat the last selector input was and when you land on a dead output it carries on in the last direction you pressed, therefore missing the dead holo.

I know it's a bit complicated and not too specific, but I confused myself doing this....

Good luck on the level.

Edit: For your drag a rectangle problem, at the end of the evel when all is done, take the small grid square size of your playing field and remake it in little holo squares. On each, place an impact sensor sensing an invisible holo cude on your cursor with a tag on it. (microchip on the small squares BTW) Place an AND gate and set its output to turn the holo on. To the other AND gate input use the controllinator X output. now when you're over the specific squares, hold X and drag, the squares will light up. Temporarily. I just re-read that last bit and it won't work. Perhaps someone can add to it?
2011-03-07 20:21:00

Author:
mutant_red_peas
Posts: 516


I believe emiting the holo is not neccessary. Are you aware, that you tags have input and can be activated by the signal? (they can actually even transmit signal strength in case of analogue signal - if you change the settings of the tag senzor). That way you need just a tag on the cursor in case you you want to select the units directly - just set the propper tag senzor radius on the units a voala.
The rectangle may be possible by emmiting two different tags. And then using tag senzor with 90degree radius. That way you can check if unist is "between those two tags". Only problem is it is easy to implement if you know the firs and second corner. But in reality you never know if the player will start dragging from the top leftcorner or the ottom right corner. And emiting the tags in wrong cornes will ruin your tag senzor checks :-/

From my experience you can consider my solituion for selecting all units close together. It is very easy to implement and in most cases servers players needs - they want to sent whole groups. You can check what I mean here - http://lbp.me/v/x0x728
And detailed info about controls here: tinyurl.com/Sackcraft
I did not included standart selection of the units. But the idea is same. You will connct the logic to different stuff. I connected it to "move logic", you will connect it to "change to selected status".
2011-03-07 20:29:00

Author:
Agarwel
Posts: 207


Adding to what Argawel said, you could use a combination of that and dragging to select your units, and even an extra selection option to quickly find your troops and movd then.

Good work guys
2011-03-07 20:35:00

Author:
mutant_red_peas
Posts: 516


Edit: For your drag a rectangle problem, at the end of the evel when all is done, take the small grid square size of your playing field and remake it in little holo squares.

Depending on the size of a map, I would discourage this. I tryed to create nice Fog of War - using the small black squares that reappeared after a while and dissapeared in case my units were close. And these block werent so small. If I rememeber correctly it was 5x5big squares.
And this grid took over 25 percent of the thermo. Due to overheating problems I had to delete it completelly. Since then Im not a frined with "cover with holo squares" solutions :-D
2011-03-07 20:36:00

Author:
Agarwel
Posts: 207


Weeeeeeell I think we need to keep on thinking then.

I wish everything would just WORK for ONCE!
2011-03-07 20:45:00

Author:
mutant_red_peas
Posts: 516


I am making a strategy and I made use of the waypoint technique. I had it so that when you clicked X on your guy/guys, then a tag was turned on on the cursor, and the units waypoint followed your cursor. Then when you clicked X again, the tag on the cursor shut off, and the waypoint stayed where you shut it off, and your guys then move to that location. As for the click and drag select, I will need to keep thinking. You can ask me any questions oif you need to! (Oh ya, and each unit has its own waypoint)2011-03-07 21:09:00

Author:
Unknown User


waypoint

THAT is a good idea. The cursor could emit the waypoint so the sackbots follow it. Then, with clever use of counters, it will only emit again after you've pushed X to make it disappear.

Or just have the emitter emit one at a time, max. emitted at once = 1.
2011-03-08 06:48:00

Author:
mutant_red_peas
Posts: 516


Actually I made mine so that each unit has a hologram waypoint so that when you select it, the hologram turns onand follows the cursor, but you could use your cursor emitter idea. If you want to see my actual system, then just add me via psn: red-man-rocks2011-03-10 01:20: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.