Scripting Player Killed Player Conditions/Actions

Discussion in 'Halo and Forge Discussion' started by TAxxOUTBR3AKxx, Jul 12, 2017.

  1. TAxxOUTBR3AKxx

    TAxxOUTBR3AKxx Ancient
    Senior Member

    Messages:
    35
    Likes Received:
    27
    Pretty self-explanatory. Is there a way to detect when a certain player kills another player? I'm assuming there's no easy way about this, which would be why we still don't have VIP, Juggernaut, or Regicide.

    In actuality, these gametypes would be fairly easy to code....if we had the right way to target players directly and not through some convoluted way.

    Basically all 3 modes are Slayer-based. Set kills to 0 points. We'd need a way to set our "King/VIP/Juggernaut" so that when killed points can be awarded properly.

    Kings are determined by who on the team has most points would always be King. Simple score check for each player on a team. Highest scorer gets applied Alpha traits and either a Global variable or label to dictate King status.

    VIP is random on a team. I'd assume the easiest way for this would be to assign a Team Variable to each player and somehow have the game choose an active variable at random? Then apply Alpha traits and either a Global variable or label to dictate VIP status.

    Juggernaut would just pick a random player at spawn and is applied Alpha traits with either a Global Variable or label to dictate Juggernaut status. Then make the next Juggernaut the player who kills the previous.

    It seems so simple and could easily be done but I feel were missing a detrimental tool to detect when a player is not only killed but by who. Would each player in a game need assigned a variable? Could you conditionalize who kills the player? I know there's a "Health Below" condition, so does that work directly on players? Does assigning a variable to an initial spawn pass that to a player who spawns on that point? These are all questions I'd like answered, please.
     
  2. KeeLoker

    KeeLoker Legendary
    Wiki Contributor

    Messages:
    277
    Likes Received:
    375
    Well if you put something with a boundary on a spawn, you'd just need to script it so when a player enters the boundary, they are given that label at the start of every round. Idk about everything else..
     
  3. PurpleFiftyTwo

    PurpleFiftyTwo Legendary

    Messages:
    10
    Likes Received:
    4
    One thing that might help; the minigame mode (instead of slayer) allows kills to increment player score but not team score, so you can script team score yourself.

    Juggernaut sounds like it is not possible with current features; there is noway I can think of to determine the killer. The other two sound achievable with some limitations. If, for example, you just want a specific player death (regardless of who killed them or how they died) to trigger the points for the other team, then it should be possible to use mods within actions to find dead players with the VIP or king label and trigger a script to update score, pick a new player, etc.
     
    ExTerrestr1al likes this.
  4. ExTerrestr1al

    ExTerrestr1al Forerunner
    Senior Member

    Messages:
    2,387
    Likes Received:
    2,515
    yes, determining killer is not possible as far as I know. nor can we assign a killer when an indirect event occurs (like a death from a trap set by the "killer")

    well actually, technically it may be possible to determine killer - here's a suggestion I made in a thread about "who shot a target?".

    You'd have to put a target around each player's six sides, and multiply that by the number of players, assigning a set of X to X different teams (where x is num of players), allowing only that team to shoot it. Then, every time it is shot, it could kill the player and give the player or team a point, depending on the ownership of the target itself.

    But as you can see, that is so complicated, it is nearly impossible, and probably wholly impractical.
     
  5. TAxxOUTBR3AKxx

    TAxxOUTBR3AKxx Ancient
    Senior Member

    Messages:
    35
    Likes Received:
    27
    Ok how about this. It doesn't matter WHO kills the player, so long as the correct team is awarded. I just had an idea. What about using labels to affect points? If a player dies, is a label technically removed from the live player until they redrawn if they are the activator? I was thinking this:

    Have an action that allows players kills to accumulate but not add to team score. Then, have a condition that checks which player has the highest score on the team. Apply traitset to that player (for say Regicide), and assign a label to the player. Then, spawn an invisible volume that spans the entirety of the map with a boundary, and set up a script for boundary check:exit on that label and if so, add point for opposing team?

    Respawning sets the Player:Enter boundary condition to true so I'd assume a death would set the exit condition as true if they died as well.....but can we conditionalize an object with a label leaving a boundary though?
     
  6. PurpleFiftyTwo

    PurpleFiftyTwo Legendary

    Messages:
    10
    Likes Received:
    4
    That sounds roughly plausible but prepare yourself for a world of scripting pain! However I'm now sure how you'd grab the player with the highest score. The mods system for manipulating source/target objects is powerful but has limitations.
     
  7. TAxxOUTBR3AKxx

    TAxxOUTBR3AKxx Ancient
    Senior Member

    Messages:
    35
    Likes Received:
    27
    See that's the thing. I'm used to the expanded script conditions when I would rip through Halo 4 gametype script xml's when modding them. We could easily detect players being killed and by who. Here, we have to do some bullshit script hoop-jumping just to get a simple command. I'm writing on paper a proposed way to go about dealing with a "leader" and how to possibly move it from one player to the next.
     
  8. PurpleFiftyTwo

    PurpleFiftyTwo Legendary

    Messages:
    10
    Likes Received:
    4
    I've never done H4, but I agree this is horrible to work this. I'm a professional software developer and I'm finding it tough going. Add in a load of bugs and a tortuous UI and the whole thing is pretty off-putting. I've resorted to paper here too!
     
  9. ExTerrestr1al

    ExTerrestr1al Forerunner
    Senior Member

    Messages:
    2,387
    Likes Received:
    2,515
    I definitely recommend the use of a spreadsheet when getting deep into assigning variables,labels,channels etc. helps ot keep things straight
     
  10. TAxxOUTBR3AKxx

    TAxxOUTBR3AKxx Ancient
    Senior Member

    Messages:
    35
    Likes Received:
    27
    Edit for expansion on idea
     
    #10 TAxxOUTBR3AKxx, Jul 14, 2017
    Last edited: Jul 14, 2017

Share This Page