Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

You may want to verify that you are looking at the correct file or lines of code. The error message points to this line:

if scene.targetskill.targetgroup == 'enemy' && scene.selectedcharacter.group == self.group:

This line has nothing to do with damage at all. It checks that you haven't selected one of your own party members as the target for a skill that targets the enemy. "group" shows up twice in this line, both being the string member variable of combatants that indicates which group they are apart of.

 I have not yet ruled out the possibility of a race condition due to rapid inputs, but it should not be the case that something was skipped due to poor performance.

(1 edit)

Oh yeah, thanks for pointing that out I pretty much went with first thing I saw on top the page with 'go to' line function search, still getting hang of coding  and it was literally in next code func below.

Anyways think you might be correct with rapid inputs, did some stress test with large images all that was achieved creating lag spikes no change in script flow, only when mashing button inputs you get the problem and a lot sooner in frenzy manner.

(1 edit)

Not certain that this is the only gap, but neither the key press event for skills nor the skill button press function checks the battle state before doing stuff. Adding the following couple of lines to the start of pressskill(), should cover this gap.

func pressskill(skill):
    if period != 'base' && period != 'skilltarget':
        return

Note that this site converts leading tabs to spaces, so you will need to convert them back to tabs.
This should mean that the window for pressing the 1 key after a mouse click was only about 1/30 of a second.

The code line worked, wasn't able to deliberately create any soft lock or seen any odd effects.

So yes it suitable to stop odd chance of the problem occurring.