Score increment script help needed

Discussion in 'Halo and Forge Discussion' started by Flame Sama, Dec 14, 2016.

  1. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    I'm trying to make a mini-game based on targets where when a target is destroyed, it increments the team score by one.

    So I had the target scripted so that when Destroyed/Despawned>Message Send: Whiskey or whatever. And a neutral team script brain set that on Message Recieved: Whiskey>Increment Team Score by 5.

    This basic setup worked after a tweak to make sure the script only incremented by one. Then I went to work on another similar aspect of the mini-game and restarted the game after saving to reset my score (after trying and failing to make a reset target by setting the player's score to 0).

    Then I noticed my script no longer increased the score. After restarting again, rebuilding the script from scratch, and even rebooting the game and trying a different canvas I can't get this to work again. What did I change to break the initial script, and/or what am I forgetting to change that means subsequent tries don't work?

    I tried looking for tutorials but none of the ones available that I saw are close enough to be applied.
     
  2. Sn1p3r C

    Sn1p3r C Halo 3 Era
    Creative Force

    Messages:
    379
    Likes Received:
    578
    Are you changing team score, or player score? Player score won't reflect in the game bar, but team score will, per patch notes... somewhere.


    EDIT: Found it!


    Minigame - A simple mode for building your own custom game modes in.
    • Four trait slot options can be setup and triggered with the Forge scripting
    • Options to enable/disable objects minigame:surprise:bject labeled objects in Forge
    • NOTE: In this mode when playing a Team based game, player scores do not contribute to the team score. This is intentional to allow for a wider variety of custom gameplay experiences. Through scripting it is possible to convert player score into team score though.
     
  3. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    It doesn't seem to work with team scoring either, I'd take either until I work on the idea some more.
     
  4. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    I had my capture card running when I got this to work for a brief moment. Shooting the targets DID make my score go up in Forge.

    Then I restarted the session to clear my score and it no longer worked. I repeated what I did step-by-step and it doesn't work so the only thing I can think of is that it was a glitch that it worked.

    Which begs the question then, what is the *right* way to get destroyed targets to increment your score for a mini-game?
     
  5. Starship Forge

    Starship Forge Recruit
    Senior Member

    Messages:
    183
    Likes Received:
    140
    Have you tried simply having the targets increment the score themselves when destroyed, rather than messaging another object to do it?
     
  6. TurbTastic

    TurbTastic Forerunner
    Senior Member

    Messages:
    185
    Likes Received:
    128
    I've caught myself doubting my scripting abilities on a few occasions, only to eventually realize that I had disabled scripting on the map and forgot. Derp. But try what Starship said, make it so that when it's destroyed it does the score change itself. I think you're going to want to use Team(add) and pick red/blue.
     
    Katanga likes this.
  7. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    Once it dawned on me that I could I believe I did try it. I'm going to try it one more way as a one item method next time I'm on, then I'm totally at a loss.

    I never disabled scripting on any level that I saw. Plus starting over from scratch would be scripting was on by default I believe, still didn't work. I'll try it all again when I'm on in a bit.
     
  8. Nitro

    Nitro Guilty Spark

    Messages:
    549
    Likes Received:
    1,467
    Flame Sama likes this.
  9. Agent Zero85

    Agent Zero85 Legendary
    Wiki Contributor Senior Member

    Messages:
    400
    Likes Received:
    435
    The master is here. (ish???)
    Lol. But in order for me to understand exactly what's wrong, i'd have to join a game with you.
     
  10. Max Extra

    Max Extra Forged Friday Founder
    Staff Member Administrator Forge Critic Senior Member

    Messages:
    547
    Likes Received:
    784
    I have not been able to look at the targets my self, but can you not:
    On interaction: score change: increment Activators score by constant or what ever?
     
  11. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    Just looked at it right now, I believe interaction is reserved for buttons/switches because it's not an option for targets.

    I have it set for When Condition: Destroyed/Despawned, Do Score: Change, Type: Team.
    Scorers - Operation: Increment, Source: Constant, Value: 10, for example, randomize: off.
    (There is no option to set this/activators on the target object so it refers to THIS).

    And options I have Condition and Round Interrupt off with Always Runs on and Enabled on.
     
  12. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    Ah-****ing-HA, I finally got it working again when setting the script brain to focus on an individual team and when I have the target send a message and the brain make a score change based off of the activator receiving it. Thing is, I SWEAR the script brain wasn't set for a team before, so I don't know why it worked the first time.

    Oh well, problem solved for now. Thanks for the advice guys.

    EDIT: Now I need to figure out how to only increment the score for the team that hits the target. If I'm on blue team and break a target, now red and blue get points.
     
    #12 Flame Sama, Dec 15, 2016
    Last edited: Dec 15, 2016
    Nitro likes this.
  13. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    I have no idea how to get it to recognize which team is doing the scoring.
     
  14. Architex

    Architex Legendary
    Senior Member

    Messages:
    8
    Likes Received:
    10
    Having a neutral target recognize the team it was shot by doesn't seem possible without ballistic forensics. So it seems each team would need their own set of targets.
     
  15. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    Oh, well if that's true then my gamemode is kinda dead in the water because the idea was to have respawning targets that the teams fight over.
     
  16. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    I've got an idea that I'll set up when I'm done at the gym and then you and I can test it
     
  17. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    I'm sorry I just now saw this post. Did it end up working?
     
  18. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Haven't tested it yet got distracted lol. I would need a second player to actually test it though
     
  19. Rethal

    Rethal Ancient
    Senior Member

    Messages:
    190
    Likes Received:
    44
    Aw man. Looks like my idea won't work. I misremembered a function of the target... if you can use Number to keep track of which player killed it, that might be a work around
     
  20. Flame Sama

    Flame Sama Ancient
    Senior Member

    Messages:
    89
    Likes Received:
    16
    I tried different number settings and could never found one that worked and allowed both teams to independently earn points.
     

Share This Page