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

Some Logic Help Please.

Archive: 29 posts


hi again, like stated before im new to LBP and therefore new to the logic lol.

here is a couple of problems im running into in my top down twin stick shooter, i am trying to give my ship 3 guns which you can select by pressing L1 which i got workinh by using a selector, 3 AND's and 3 emitters, sounds good lol, but now when i use the analouge stick to turn and fire the firing pauses for a couple of seconds here and there, and i cannot figure out why.

the second problem i am having is how to make it so 4 players can play the game together, i cant even think where to start, as soon as the player spawns he enters the space ship via controlanator so i tried making two ships but nothing.

i then tried to add seperate player sensor to ship 2 and setting players required to 2 but that did not work either, also would the ships collide if i manage to fix it?

sorry for been long winded but any help is gratly appreciated here.
2011-02-07 23:52:00

Author:
steadler
Posts: 180


Sounds like your logic is fine, going just from what you've written here, so I don't know what to tell you. As for handling multiple players, I would set up a player sensor at the entrance to emit a ship.2011-02-08 00:37:00

Author:
Lokno
Posts: 68


do i add just a player sensor or do i need to add tags or anything, i want each player to be able to score independently if that makes sense lol.

sorry i have searched for the answer but i didnt really find anything specific.

the right analouge stick of the controlanator is conected into the AND gates, which are run of a selector but now when i spin it stops firing bullets if i am looking straight up, straight down or left and right, but fires if i am facing diagonal, anyone know why this is?
2011-02-08 00:41:00

Author:
steadler
Posts: 180


I think if you just emit the same ship with a score giver in it, the score will go to the player driving said ship.2011-02-08 01:10:00

Author:
Lokno
Posts: 68


Sounds like one of those AND gates should be an OR gate so when your pushing up/down OR left/right the emitter isn't looking for both inputs that are activated when on the diagonal.

The multiplayer thing is something i'm working on now I have the entrance drop on to a row of controlinators each set to emit individual vehicles for each player to contol remotely.
2011-02-08 02:12:00

Author:
Ace29
Posts: 132


thanks ace ill try that now, and droping in dont sound like a bad idea lol.

i tried that now all that happens is it fires on its own without having to touch anything lol, and when i press L1 to change weapon it stops auto firing and lets me take control of the fire rate, but no weapon switch, i have been trying this for nearly 5 hours lmao
2011-02-08 02:31:00

Author:
steadler
Posts: 180


up now with a fresh head, anyone else got any input or is willing to come in create mode with me and take a look?2011-02-08 09:00:00

Author:
steadler
Posts: 180


Are you using solid material for bullets? Because it sounds as if your emitter is trying to emit a solid object in the place of where there is already another solid object. My suggestion is to use holographic material; that will also help if you are having more than one player and you don't want bullets of a player impact another player's ship.

Holo can also fly through walls, but if you want to prevent that, have a bullet activate a Destroyer through an Impact sensor; if you want bullets to differentiate between players, enemies and/or walls, you can put tags on stuff and have the bullet's impact sensors react differently to tagged objects. A complex level layout you may want to add a tagged 0% (invisible) holo shape to here and there, for efficiency's sake and to easily distinguish between blocking and passable material. Works for players crashing into walls, too.

EDIT: this is the logic for a simple weapons system, by the way. I drew it with only two weapons to cycle through, but this is easily changed into whatever number you like.

http://i.imgur.com/K2BqD.gif

Switch using L1 (cycles through Selector). Selector activates separate Microchips (MC) that each contains the logic for an individual weapon - which is basically an emitter hooked up by X, but you can put Timers and stuff in there as well. Everything on a microchip can get turned ON and OFF in a heartbeat this way. Make sure the Controlinator (DCS) is not on the MC's you are turning on and off, although that is still possible (just inefficient because you are then using two instead of only one).
2011-02-08 12:53:00

Author:
Antikris
Posts: 1340


thanks for the detailed description, ill give it a go now, i am using a solid object for my bullets maybe thats the problem lol2011-02-08 13:39:00

Author:
steadler
Posts: 180


thanks for the detailed description, ill give it a go now, i am using a solid object for my bullets maybe thats the problem lol

If your space ship is moving, also set each emitter to 'ignore parent velocity'. It will prevent bullets from hugging each other when the ship moves into the firing direction.
2011-02-08 13:51:00

Author:
Antikris
Posts: 1340


still does the same, i can switch weapons fine no problem, but when i have a switch weapons option, i cannot shoot straight up, straight down or direct left and right, i can only shoot diagonally, is it possible for you to come in and have a look for me, you will probarbly fix it in 30 seconds lol where i have been going most of yesterday and 4 hours today lmao.2011-02-08 13:53:00

Author:
steadler
Posts: 180


is it possible for you to come in and have a look for me

Convince my boss to let me go home and play LBP2. I can give you his phone number.

Edit: if directional aim (without turning the ship itself) is your goal, have a look at this video tutorial (http://www.youtube.com/watch?v=d7Vi1Q2e000), courtesy of Mako (http://www.lbpcentral.com/forums/member.php?18373-Mako)
2011-02-08 13:57:00

Author:
Antikris
Posts: 1340


lol, i wish i could at this point im about to tear my hair out hahaha (whats left of it lol)2011-02-08 13:58:00

Author:
steadler
Posts: 180


I believe Ace29 is correct - your AND gates should be OR gates. If one wire to your AND gate goes to the left/right and one wire goes to the up/down, then the AND gate will only be ON when it gets both and up/down AND a left/right. This means it will fire ONLY when you're pressing diagonally. Change those to OR gates and I think you'll have it working.2011-02-08 14:31:00

Author:
Shanghaidilly
Posts: 153


then it shoots automaticly on its own this is so confusing lol2011-02-08 15:00:00

Author:
steadler
Posts: 180


then it shoots automaticly on its own this is so confusing lol

Open all your logic circuits and make a screenshot?
2011-02-08 15:06:00

Author:
Antikris
Posts: 1340


ok give me 5 mins then mate, thanks for the help.2011-02-08 15:25:00

Author:
steadler
Posts: 180


ok so here are my circutry images lol

here it is single fire works great.
http://img689.imageshack.us/img689/5571/imag0125y.jpg

here it is with weapon switcher (want 4) but only works diagonal for some reason

http://img195.imageshack.us/img195/5905/imag0126n.jpg

and someone got this one to work for me but i can only have 2 weapons lol
http://img829.imageshack.us/img829/3603/imag0124k.jpg
2011-02-08 16:08:00

Author:
steadler
Posts: 180


The AND and OR gates, it can easily get messy. I recommend you take the weapons switch schematic I posted earlier and put the logic of your first picture (only the emitter and the OR gate) into each of the microchips. You can then tweak the separate emitters to emit different bullets or change the way a weapon works altogether on a chip, without having to worry its logic will interfere with that of another weapon.

The joystick steering and morizontal/vertical movement logic, keep it as in picture 1.
2011-02-08 16:23:00

Author:
Antikris
Posts: 1340


ok thanks ill try that next thanks.2011-02-08 16:26:00

Author:
steadler
Posts: 180


I think the AND gates may have been properly set and maybe should not have switched the AND gate but maybe set the OR gate up ahead of the AND gates so that the and gates still require both the inputs to fire instead of going automatically.

Basically the OR gate would just be for the two outputs of the right stick only.
2011-02-08 16:53:00

Author:
Ace29
Posts: 132


I think the AND gates may have been properly set and maybe should not have switched the AND gate but maybe set the OR gate up ahead of the AND gates so that the and gates still require both the inputs to fire instead of going automatically.

Basically the OR gate would just be for the two outputs of the right stick only.



you sir are a genious, worked like a charm

thanks alot.
2011-02-08 17:02:00

Author:
steadler
Posts: 180


lol but now you are going to hate me, how to i set emitters to start after a certain score through a randomizer?

do i link a scoresensor straight to the randomize which is obviously linked to the emitters?

thanks in advance (again)
2011-02-08 17:09:00

Author:
steadler
Posts: 180


Place a NOT gate with the OR gate then.


NOT gate----OR gate----emitter.
2011-02-08 17:21:00

Author:
creator22
Posts: 162


what to start the emitters?2011-02-08 17:28:00

Author:
steadler
Posts: 180


probably what you need is player sensors that activates an emitter via a tag to dont emmit to many of the ships or something like that i helped you with shooting logics in game so theres nothing wrong there just use your creativity cuz thats what the game is about.. oh and playing awesome levels 2011-02-08 17:51:00

Author:
Unknown User


probably what you need is player sensors that activates an emitter via a tag to dont emmit to many of the ships or something like that i helped you with shooting logics in game so theres nothing wrong there just use your creativity cuz thats what the game is about.. oh and playing awesome levels

you did indeed help and im grateful trust me lol, i have sussed the score sensor to emit more bad guys now so everything is cush there too.

thanks everyone for your help, now just to add multiplayer and abit more prettyness lol
2011-02-08 18:53:00

Author:
steadler
Posts: 180


Don't forget to add Notes to your logic or else you'll forget how it works. 2011-02-08 18:56:00

Author:
Antikris
Posts: 1340


nice tip i will do that lol2011-02-08 19:07:00

Author:
steadler
Posts: 180


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.