Have any of you implemented a combo/hit counter in your battles? I don't believe it's something in the tutorials but I'm wondering if it's something possible through Ork or should I just try to program it myself lol.
  • No, there's nothing like that in the tutorials, but you can add this as a custom system using the event system (i.e. the battle events that animate your actions) and variables.

    You'd basically increase the hit counter in your battle events each time you hit the target. E.g. the Calculate node can optionally have next slots for hit and miss, so you can make sure to only count actual hits there.
    The counter itself would be a global float variable and can be displayed by an Information type HUD (using text codes). The HUD can also be shown/hidden based on variable conditions (e.g. on the counter being greater than 0 or a bool variable to toggle it on/off).
    At the end of the action you'd reset the counter to 0.
    If you're enjoying my products, updates and support, please consider supporting me on!
  • edited October 9
    Hi again! I figure I can piggy back off of my own thread, but I'm wondering what the best way to make the combo counter disappear if the player hasn't landed a hit within a certain amount of seconds.

    Player hits
    Player hits
    Combo is now 2
    player/party stops hitting within 2 seconds
    counter resets to 0

    I'm assuming I can start with a global event at the very least that checks when a combo was last landed...? Maybe with time elapsed - a global event will check if the playerCombo variable is above one hit, and then after that, perhaps another variable to track that combo if more than 2 seconds have elapsed, then reset it back to 0?
    Post edited by PBoTG on
  • Generally, for checking if the last hit was X time ago, you'd set a global float variable (or on the same variable origin you set the combo counter) to the current game time (value type) + the offset you want.
    So, for 2 seconds, it'd be offset 2.

    Now, to check if the time passed, you can use a Check Value node, checking the float game variable you've stored being less than the current game time (with 0 offset).

    When or how you do that depends on how your system is overall working. You could e.g. have a global event run each second (or 0.1 seconds, etc.) to do the check and reset the counter.
    If you're enjoying my products, updates and support, please consider supporting me on!
  • Ok great. I'll try something like that and get back to you.

    Now my next question is something I've asked before but I can't find the answer so I guess I'll ask again!

    Is there any way I can shortcut a target selection battle menu to a key? That way I could choose the target and lock on attacks without the target menu coming up every time I attack like it did did before!
  • Yes, the individual/group targets (see Battle System > Target Settings). Individual targets are only available for the combatant who selected it (e.g. the player), the group targets are available for the whole (player) group.

    For your action selections (e.g. in the battle menu or via control maps), you also need to enable using individual/group targets :)
    If you're enjoying my products, updates and support, please consider supporting me on!
  • edited October 18
    Thanks! I'm gonna continue piggybacking off this thread if that's okay.

    1) It appears my characters actions aren't targetting the enemy they targetted. I.E, I go to hit enemy a, but the log says I hit enemy b, despite the damage dealer hitting enemy a. My character also will face this character despite not being targetted to that one. It's almost like the attack is targetted to that rather than the actual target?

    2) Is there a way in battle events to see if party members are hitting the same enemy as the player? I wanna make sure the combo counter goes up only if everyone's hitting the same enemy.
    Post edited by PBoTG on
  • 1) Depends on which console text it is, e.g. the Perform Action Texts is added to the console when the action is starting, so whatever target was set at that time will be printed.
    Since you're using damage dealers, this might not be the same target as the one that was hit.

    2) Hm, probably using selected data. The Select Combatant allows you to get targets via the Combatant Origin setting.
    If you're enjoying my products, updates and support, please consider supporting me on!
  • edited October 21
    Hm... I'll try out the selected data.

    Is there anyway to switch the selected target depending on which enemy was just hit by the damage dealer? o:

    Edit 1) for selected data, what would I put for selected key? I'm assuming I would use all combatants for combatant settings and perhaps last target for the origin?

    2)I've noticed a glitch with scene changing and I'm not sure if it's happened to anyone else.

    For my battles, I have a white color for fading. Every other scene transition has a black fade. If I do one battle, all of my scene transitions are faded white as opposed to black. If I don't do any battles, it stays as normal. Any idea what could be happening?
    Post edited by PBoTG on
  • The Change Action Targets node is available in battle events to change the target of the action. Abilities/items can also use battle events to animate damage dealer hits, so that should be possible.
    I don't think it's possible to change the group/individual target of a combatant, though.

    1) You can pot whatever key you want, like variable keys it's up to you and onnly used to access the data again.
    I've thought a bit more about your combo counter, and I think a better solution would be having a counter on the target instead. I.e. using object variables, the target's counter would increase with a hit. If this is somewhat time based (e.g. only hits within 2 seconds count and otherwise reset the counter), you can use an additional float variable storing the current game time + 2 seconds. Before increasing the counter, you'd check if the stored time is less than the current game time (i.e. more than 2 seconds passed).

    2) That's due to there only being one actual screen fader - so if one changes the color (i.e. also fading red, green and blue) and the next one only fades alpha value, the color will still be the same.
    You might want to change your screen fading to fade all values (red, green, blue and alpha) to make sure they're the correct color :)
    If you're enjoying my products, updates and support, please consider supporting me on!
  • Thanks! Fixed the fading.

    I have the time based for the combo all set up and working - I suppose I should just add it to the target then so its not focusing on every target.

    Though I still do have an issue with targeting and I think that won't work until I fix it?

    I tried a ranged magic attack that should hit it's target - but it ignores the target I'm targeted to and goes to a different one instead. Which I think may be related to the log showing a different target then the one my icon is over. I'm not too sure how to fix that!
  • There could be different reasons for that, e.g.:
    - group/individual target not allowed for that ability (although you'd have to actively set it up that way)
    - source calling the action (e.g. battle menu, control maps) not set up to use group/individual targets
    - target out of range and using auto targeting instead

    I'd need to see your settings to say more ... or a small Unity test project where it happens :)
    If you're enjoying my products, updates and support, please consider supporting me on!
Sign In or Register to comment.