Logic System - Spawn building with a "lifes left" counter

    Joined
    May 25, 2013
    Messages
    170
    Reaction score
    62
    • Legacy Citizen 4
    So I'm planning to do some events where each team has got a number of lifes. For that I needed a spawn with a counter that would block access to an area once the maximum is reached. This is Work In Progress (because this design is still too ineffective and it has a bug which I will explain later).

    I apologize I have not added a tutorial on how to do it yet, once I have more time and the system is effective, fixed and basically usable I will update this thread explaining step by step how to do it.


    For now, I will explain what it does and what it looks like:



    It's a building with a column of lights on it to indicate how many lifes each team has spent. It has a tunnel with a door at the end of it (Pic 1). Players have to set a spawn located on the top of this particular building (Pic 2). Once the game starts, the PlexDoors under the Undeathinator will be opened (One can see them in pic 2).

    Everytime a player spawns he will trigger the counter and turn one light more on (Pic 3).

    Once the lights have reached the top, the team has used up all their lifes and the door at the end of the tunnel will restrict access (Pic 4).




    Pic 1






    Pic 2






    Pic 3






    Pic 4




    Bugs: If the counter is triggered twice in a row very fast it will reverse its signal (therefore not reacting to spawning players) until the same which activated it happens again (being triggered twice very fast). I've thought about solving it with a system that checks if the responsable block is on for longer than 1 second, should be easy.

    And yes, I know there still are blocks that don't need to be there, haha!
     
    Last edited: