Help

Discussion in 'Custom Content' started by Nimster, Mar 10, 2019.

  1. Nimster

    Nimster Space Hobo

    Trying to create a health system where the player would lose a life every time they lose a unit. My method is to create a counter (lives) and then events for every life in the form of:

    Conditions: Any unit owned by Player 1 is lost at any location + Map counter lives is exactly 8 (starting lives)
    Actions: (something on the map to signal to the player that they lost a life) + Map counter lives: subtract 1

    The problem with this is that it goes so quickly that the game doesn't forget about the unit that died and creates a chain reaction where all lives are lost one after another because the counter changes. I've tried a lot of things and at this point my only hope is that they'll add a "When: start of unit turn" condition in some later update. I think it would change things as that allows an action to happen on the board between events and might have the game disregard the lost unit.
    But still, does anyone have a solution to this?
     
    • Erick648

      Erick648 Pangalactic Porcupine

      I haven't tested this, but you could try splitting it into two events:

      Event 1:
      Conditions:
      - Map: Flag: "LifeLost [or whatever you want to call it]" is UNSET
      - Unit: Lost: Any unit owned by Player 1 is lost at any location
      Effects:
      - Map: Set Flag: "LifeLost" to SET
      - UI: Show Dialogue Box: [write message about losing a life]

      Event 2:
      Conditions:
      - Map: Flag: "LifeLost" is SET
      - When: End of Unit Turn
      Effects:
      - Map: Modify Counter: Subtract 1 from "Lives"
      - Map: Set Flag: "LifeLost" to UNSET

      By changing the unit loss to a toggle, and waiting until the end of the unit turn to actually subtract the life, you create a delay (between the loss of the unit and the end of the unit turn), which would be pretty much instantaneous for the player, but should hopefully be enough that the game is no longer processing the unit's death.

      EDIT: The one downside is that if multiple units are lost in a single unit's turn, you only lose one life, but as far as I know, that can only happen from losing an occupied Wagon/Barge/Balloon or from certain Grooves (Ragna, Ryota, Koji, Dark Mercia, and maybe Sedge depending on whether his bonus for killing a unit is processed as giving him a new turn or extending his current tun)---or from Events, of course.
       
        Last edited: Mar 10, 2019
      • Nimster

        Nimster Space Hobo

        You genious, it works! Thank you so much:)!
        I hadn't thought of that loophole, but it shouldn't be a problem. The only possibility is with a wagon but that probably won't happen + it's a pretty small map so I'm not sure how useful wagons would even be. Maybe I'll just forbid them from using wagons.
        But thank you again, this has saved me from a lot of gray hair.
         
          Erick648 likes this.
        • Hezablak

          Hezablak Tentacle Wrangler

          Here is a solution that would account for 2 players life keeping behind the scene.
          Total counters 2:
          P1 lives: set to 8 default
          p2 lives: set to 8 default
          Total events 4:
          P1 life loss_ Repeat
          Players: Player 1
          Conditions: Any Unit owned by Player 1 is lost at Any Location
          Action: Counter P1 life: subtract 1/ Display Dialogue box with ___ saying " Player 1 lost a life."

          P2 life loss_ Repeat
          Players: Player 2
          Conditions: Any Unit owned by Player 2 is lost at Any Location
          Action: Counter P1 life: subtract 1/ Display Dialogue box with ___ saying " Player 2 lost a life."

          P1 win_ Once
          Players: Both
          Conditions: Is counter P2 life exactly 0?
          Event: Award Victory to Player 2. / Display dialogue box with ____ saying "P2 wins"

          P2 win_ Once
          Players: Both
          Conditions: Is counter P1 life exactly 0?
          Event: Award Victory to Player 1. / Display dialogue box with ____ saying "P1 wins"

          Side note: If you want a living counter. You can spawn 8 of any unit in a walled of area for each player. Each on their own event space. Then you would have 8 events where if lives are exactly 7,6,5,4,3,2,1. Despawn unit on this space.
          Or you could have dialogue pop up when either counter hits certain points. etc. P1 has 3 lives remaining. P1 has 1 life left.
           

          Share This Page