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

Hiding timers until button is pressed

Archive: 3 posts


So... I'm building a space dogfight and some space ships to go with it... But I have a problem:

I want the level to be pitch black and allow players to basically assassinate other players, so I want to be able to hide their Health Bar Timers until they press a button then to reveal it for a few seconds.

The current setup I have is three timers (Blue, Green and Red for Shield, Armour and Hull respectively) on an invisible piece of Hologram glued to the cockpit.
2013-09-20 08:15:00

Author:
Unknown User


Store the signal strengths for each ship in a Tag, located on each ship.
So, your health logic ends in a Tag labelled 'Ship-Health' and your shield in 'Ship-Shield' or something to that effect. Whatever you want to call the tags is fine.
There should be no wires leading outside the ship, to the health display.

Next, detach your stat information hologram thing and have it follow the ship(s) it needs to.
Place a Tag Sensor, with a small radius, searching for the 'Ship-Health' tag. Wire that into the positive input of a Signal Combiner.
Now wire the Combiner into a Timer, set to Speed Scale, and wire the timers output into the negative input of the Signal Combiner.
Make sure the Tag Sensor is set to receive 'signal strength'.

Test and make sure this works. The health bar should follow the ship and show the correct health, even though the hologram and the ship are in no way attached to each other, with no wires connecting any logic from the two of them.

If that works, rinse and repeat the steps for the other health bars.
Now you should be able to capture the hologram with the health info, and emitt it from the ship when you want it to display.


I wrote all this before going out so I did it in a hurry. Forgive me if I made an error, I'll resolve it when I get back, if someone else doesn't beat me to it.
2013-09-20 11:56:00

Author:
Ostler5000
Posts: 1017


lol...I would go with Osllers solution as its very effective and saves a lot on thermo. (hehe, yes man, you beat me to it).

Hi BlackSnow, another way you could try is to hide the healthbars in the background.
This way will only work effectivly If your back thick layer is free, (in other words, your gameplay area is the front 2 layers.
Assuming that your ship never moves onto the back layer, you can do this.
1. turn on the large grid and make a block of dark wood matertial (or black sticker another like polystyrene) and make a block 10 high x 10 wide x 1 layer think. move it to the back layer and place an antigrav on it (100 antigrav, 100 dampening). Now copy and paste this block to fill this background layer (effectivly making this your background).
now place the ship in the middle layer or front layer as desired.
2. next select your block of hologram with the stat bars on it and make it a thin layer imn depth. unglue it from the ship and put a follower for that ship on it (so it will follow the ship, however, twwak the follower to allow it to change layers)
Next, place a chip on the stats hologram block. OIn this place A tag sensor (set to 'status' blue). From this tag sensor wire it to 4 long sequencer.
On the start of the sequencer place an in/out mover (set to move to front). directly beside that place another in out mover (set to move to back).
3. lastly, on the players controllinator wire whatever button to activate the stat bar you want to a blue tag (labelled 'status&apos.
4. last step is to move the stat hologram onto the back thin layer.

Every time you press the button, it fires the sequencer, bringing the statbar from the back layer (hidden by the block background, into view on the front layer. The sequencer says how long it stays on the front layer, then returns it back (hidden from view to the back layer.

This is a quicker , less logic approach than the other way described, HOWEVER, Oslers approach is a better system and more effective.

Lets know how it goes.
2013-09-20 14:14:00

Author:
Sean88
Posts: 662


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.