Overworld combat attacks?

As a really quick aside while I complete the Hit Count code…

I duplicated Attack Type 6’s damage calculator, and put it as Type 7, right below Type 5. I assume the Type 7 thing at the top of the new code block is for setting it up.

Attack Type 6 itself is right below Type 4.

And, should all instances of Self Switch B=On be replaced with Last Hit=Hit Count?

I’ve implemented everything you’ve said, I think. It’s fixed some old problems and introduced some new problems.

2-The Form 4 S Blast MIGHT not do any knockback at all now. It also has a chance to do something weird to an enemy it hits. It like, gets the enemy stuck in its damage state without taking any damage. They light up in a new blend mode, get set to speed 6, and then sometimes just move back and forth in the same place. It’s completely inconsistent. Here’s the code for the Blast and for Attack Type 5.

  ◆Comment:ACTION 4 (S)
  ◆If:ActionTimer2 > 0
    ◆Control Variables:#0218 ActionTimer2 -= 1
    ◆If:ActionTimer2 = 0
      ◆Control Self Switch:D = OFF
      ◆Play SE:Maris Haven SFX/Fighting/BSFX STUTTER (100, 100, 0)
      ◆
    :End
    ◆
  :End
  ◆If:Script:Input.isTriggered("action4")
    ◆If:ActionTimer2 = 0
      ◆Control Switches:#0181 ATTACKING = ON
      ◆Control Variables:#0197 ATTACK TYPE = 5
      ◆Control Variables:#0213 AtkX = Map X of Player
      ◆Control Variables:#0214 AtkY = Map Y of Player
      ◆Control Variables:#0215 AtkDir = Direction of Player
      ◆If:AtkDir = 2
        ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Down)
        ◆
      :End
      ◆If:AtkDir = 4
        ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Left)
        ◆
      :End
      ◆If:AtkDir = 6
        ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Right)
        ◆
      :End
      ◆If:AtkDir = 8
        ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Up)
        ◆
      :End
      ◆Control Switches:#0185 RecoilGo = ON
      ◆Common Event:SCREENSHAKE MEDIUM
      ◆Set Movement Route:Attack collision (Skip, Wait)
      :Set Movement Route:◇Transparent OFF
      :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX SMACK (100, 100, 0)
      :Set Movement Route:◇Image:MH VitalAttacks1(3)
      :Set Movement Route:◇Speed:5
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇1 Step Forward
      :Set Movement Route:◇Transparent ON
      ◆Control Switches:#0181 ATTACKING = OFF
      ◆Control Variables:#0218 ActionTimer2 = 300
      ◆Control Self Switch:D = ON
      ◆
    :End
    ◆
  :End
        ◆If:ATTACK TYPE = 5
          ◆Control Variables:#0189 SV: This event HP -= SV: Damage
          ◆Control Variables:#0194 SV: My X = Math.round(this.character(0)._realX)
          ◆Control Variables:#0195 SV: My Y = Math.round(this.character(0)._realY)
          ◆Set Event Location:This Event, ({SV: My X},{SV: My Y})
          ◆Script:this.character(0).setDirection(10 - $gameMap.event(63).direction());
          ◆Set Movement Route:This Event (Skip, Wait)
          :Set Movement Route:◇Blend Mode:Additive
          :Set Movement Route:◇Speed:5
          :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX BLASTAWAY (100, 100, 0)
          ◆Loop
            ◆Control Variables:#0194 SV: My X = Math.round(this.character(0)._realX)
            ◆Control Variables:#0195 SV: My Y = Math.round(this.character(0)._realY)
            ◆Set Movement Route:This Event (Skip, Wait)
            :Set Movement Route:◇1 Step Backward
            ◆Control Variables:#0244 SV: KB X = Map X of This Event
            ◆Control Variables:#0245 SV: KB Y = Map Y of This Event
            ◆If:SV: KB X = SV: My X
              ◆If:SV: KB Y = SV: My Y
                ◆Break Loop
                ◆
              :End
              ◆
            :End
            ◆
          :Repeat Above
          ◆Set Movement Route:This Event (Skip, Wait)
          :Set Movement Route:◇Blend Mode:Normal
          :Set Movement Route:◇Speed:4
          :Set Movement Route:◇Wait:5 frames
          ◆
        :End

3-The S Ram MIGHT not do any knockback at all now, upon just pressing the S button and letting it move on its own. HOLDING the arrow key toward the enemy you Rammed at after pressing the S button puts it in the same weird state change as before. You can push it all the way into a wall even after the Ram stops, then it’ll run around at speed 6 and then destroy itself. I haven’t a clue what’s going on with this, but here’s the code for the Ram and Attack Type 3.

◆If:VITAL SHAPE = 3
  ◆Comment:s
  ◆Control Variables:#0197 ATTACK TYPE = 2
  ◆Common Event:SCREENSHAKE MEDIUM
  ◆Play SE:Maris Haven SFX/Fighting/BSFX STUTTER 1 (100, 100, 0)
  ◆Control Switches:#0181 ATTACKING = ON
  ◆Control Variables:#0225 Move Power = 130
  ◆Set Movement Route:Player (Skip, Wait)
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇Blend Mode:Screen
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇Blend Mode:Normal
  :Set Movement Route:◇Speed:4
  ◆Control Switches:#0181 ATTACKING = OFF
  ◆Control Switches:#0182 MOVEMENT ATTACK = OFF
  ◆Control Switches:#0187 PREVENTER = OFF
  ◆
:End
        ◆If:ATTACK TYPE = 3
          ◆Common Event:DAMAGE SFX
          ◆Control Variables:#0189 SV: This event HP -= SV: Damage
          ◆Set Movement Route:This Event (Wait)
          :Set Movement Route:◇Blend Mode:Additive
          :Set Movement Route:◇Wait:30 frames
          :Set Movement Route:◇Blend Mode:Normal
          ◆
        :End

4-Form 1 and 2’s S Attack now isn’t doing any knockback at all. It’s still set to Type 5 so it should be knocking them back until they hit something, so something may have gone wrong there. Here’s the code.

◆If:VITAL SHAPE = 1
  ◆Control Variables:#0197 ATTACK TYPE = 5
  ◆Control Variables:#0225 Move Power = 130
  ◆Set Movement Route:Player (Wait)
  :Set Movement Route:◇Blend Mode:Screen
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX QUICK HIT (100, 100, 0)
  :Set Movement Route:◇Jump:+0, +0
  :Set Movement Route:◇Blend Mode:Normal
  ◆Common Event:SCREENSHAKE MEDIUM
  ◆Control Switches:#0181 ATTACKING = ON
  ◆Set Movement Route:Attack collision (Wait)
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX SMACK (100, 100, 0)
  :Set Movement Route:◇Image:MH VitalAttacks1(6)
  :Set Movement Route:◇Transparent OFF
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇Transparent ON
  ◆Control Switches:#0181 ATTACKING = OFF
  ◆Control Switches:#0182 MOVEMENT ATTACK = OFF
  ◆Control Switches:#0187 PREVENTER = OFF
  ◆
:End
◆If:VITAL SHAPE = 2
  ◆Control Variables:#0197 ATTACK TYPE = 5
  ◆Control Variables:#0225 Move Power = 130
  ◆Set Movement Route:Player (Wait)
  :Set Movement Route:◇Blend Mode:Screen
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX RISING (100, 150, 0)
  :Set Movement Route:◇1 Step Backward
  ◆Set Movement Route:Player (Wait)
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇Speed:4
  :Set Movement Route:◇Blend Mode:Normal
  ◆Common Event:SCREENSHAKE MEDIUM
  ◆Control Switches:#0181 ATTACKING = ON
  ◆Set Event Location:Attack collision, ({BPlayer X},{BPlayer Y})
  ◆Set Movement Route:Attack collision (Wait)
  :Set Movement Route:◇Stepping Animation ON
  :Set Movement Route:◇Script:$gameMap.event(63).setPriorityType(2);
  :Set Movement Route:◇Image:MH VitalAttacks1(7)
  :Set Movement Route:◇Transparent OFF
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX BIG HIT 2 (100, 100, 0)
  :Set Movement Route:◇Opacity:200
  :Set Movement Route:◇Wait:60 frames
  :Set Movement Route:◇Opacity:150
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Opacity:100
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Opacity:50
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Stepping Animation OFF
  :Set Movement Route:◇Transparent ON
  :Set Movement Route:◇Script:$gameMap.event(63).setPriorityType(1);
  :Set Movement Route:◇Opacity:255
  :Set Movement Route:◇Blend Mode:Normal
  ◆Control Switches:#0181 ATTACKING = OFF
  ◆Control Switches:#0182 MOVEMENT ATTACK = OFF
  ◆Control Switches:#0187 PREVENTER = OFF
  ◆
:End

4.5-Sometimes, Form 2’s S Attack hung after I pressed S. It would not move at all and was a softlock.

5-Form 6’s wandering Attack Collision still seems to be avoiding enemies-I don’t know if it is hitting them or not. As well as that, in tight spaces, I think (Skip if can’t move) is burning through all its steps and making it disappear too quick. Is there a way to make it disregard enemies entirely and just move at random regardless of if the tile is taken up?

6-The trap SEEMS to work, but it’s really janky and I can’t really put my finger on why. It’s like the enemies try to avoid it, stop before it, and then get hit by the side of it, but I don’t know. I’ll test further. As well as that, it will hit enemies if they step onto the trap, but it won’t hit them if they continue to stand on the trap.

7-Form 6’s unique Basic seems to be fixed! I added a Conditional to ATTACK TYPE 1’s damage calculator, that if MULTI STRIKING=1 then it will do a quicker knockback. This lets it take all the damage it needs to take!

10-The mashing is working for form 1 the way I wanted it to, that’s what I was testing it on! I’ll add the code to 2, 3, 5, and 7.

11-This is fairly hard to test since it’s conditional that they walk into the side of Attack Collision, but I will watch for it happening again.

2, 3 and 4. I think these are one problem, and it’s from the loop I gave you. Each step in the loop is its own move route, and in the frame between one route ending and the next one starting, the enemy’s own Autonomous Movement gets a turn. If its frequency is on Highest, it can take a step of its own right there. A step back toward you right after a knockback step makes the loop think the enemy didn’t move, so it stops after one tile, which looks like no knockback at all. A step to the side turns the enemy, so the next Step Backward just undoes it, and it can rock back and forth like that for a while. It stays lit up because the loop never reaches the Blend Mode: Normal at the end. When you hold the arrow and follow it, you’re blocking that step back toward you, so the loop keeps going all the way to the wall.

The fix is to switch off its own movement for the length of the knockback. Two Script lines do it, one before the first route and one after the last. Here’s type 5 with them in. Type 2 gets the same two lines in the same spots:

◆If: ATTACK TYPE = 5
  ◆Control Variables: #0189 SV: This event HP -= SV: Damage
  ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
  ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
  ◆Set Event Location: This Event, ({SV: My X},{SV: My Y})
  ◆Script: this.character(0).setDirection(10 - $gameMap.event(63).direction());
  ◆Script: this.character(0)._locked = true;
  ◆Set Movement Route: This Event (Skip, Wait)
    : Blend Mode: Additive
    : Speed: 5
    : SE: Maris Haven SFX/Fighting/BSFX BLASTAWAY (100, 100, 0)
  ◆Loop
    ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
    ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
    ◆Set Movement Route: This Event (Skip, Wait)
      : 1 Step Backward
    ◆Control Variables: #0244 SV: KB X = Map X of This Event
    ◆Control Variables: #0245 SV: KB Y = Map Y of This Event
    ◆If: SV: KB X = SV: My X
      ◆If: SV: KB Y = SV: My Y
        ◆Break Loop
      ◆End
    ◆End
  ◆Repeat Above
  ◆Set Movement Route: This Event (Skip, Wait)
    : Blend Mode: Normal
    : Speed: 4
    : Wait: 5 frames
  ◆Script: this.character(0)._locked = false;
◆End

_locked is the flag the engine uses to hold an event still while you’re talking to it. It stops the event’s own movement but leaves move routes working.

If it still acts up after this, what’s the enemy’s Autonomous Movement set to, the type, speed and frequency? That would also tell me where the speed 6 is coming from, since the type 2 and type 5 routes never set it.

On 3, the ram sets ATTACK TYPE = 2, so the type 2 branch is the one it lands in, not type 3. Also, the Form 4 blast doesn’t set Move Power, so its damage borrows whatever the last attack used. A Move Power line under its ATTACK TYPE = 5 would fix that.

4.5. Both Player routes in Form 2 have Wait on but not Skip If Cannot Move. If there’s a wall or an enemy behind you when you press S, the Step Backward can’t happen, so it retries forever and the handler waits on it forever. Ticking Skip on both routes fixes that. The second one needs it too, since an enemy can step into the tile in front of you during the step back.

  1. Yes. Swap each Move at Random in the wander route for a Script command with this line in it:
const ds = [2, 4, 6, 8].filter(d => this.isMapPassable(this.x, this.y, d)); if (ds.length) { const t = this.isThrough(); this.setThrough(true); this.moveStraight(ds[Math.randomInt(ds.length)]); this.setThrough(t); }

It only picks from the directions walls don’t block, and it walks straight through enemies, so in a tight space it still uses every step instead of wasting the blocked ones. The Through OFF and Through ON lines can come out of the route, since this handles walls on its own. To check it’s landing, drop a Play SE inside the If: SV: Distance ≤ 1 for a test and you’ll hear every hit.

  1. The avoiding and stopping short sound like the Attack collision has Through off while the trap is down. Form 6 isn’t in PREVENTER, so I’m wondering if something cut the wander off before its last line. If so, the Through ON at the end never ran and the collision stayed solid. Taking those two lines out for the script above should clear that up. Getting hit from the side is the step thing again. An enemy’s Map X and Y move onto the trap the moment it starts stepping toward it, so the hit lands while it still looks like it’s next to it.

Hitting once and not again while it stands there is how the re arm block works right now. If you want it to keep hitting while they stand on it, add a ≠ 6 to the check at the bottom, the same way 1 and 3 are, and the 30 frame flash will pace it to about one hit every half second:

◆If: ATTACK TYPE ≠ 1
  ◆If: ATTACK TYPE ≠ 3
    ◆If: ATTACK TYPE ≠ 6
      ◆Control Variables: #0XXX SV: Last Hit = Hit Count
    ◆End
  ◆End
◆End

Nice on 7 and 10, and that sounds good on 11.

2-I think the Form 4 S Blast is done!

3-Oops. Here is Type 2’s code.

        ◆If:ATTACK TYPE = 2
          ◆Control Variables:#0189 SV: This event HP -= SV: Damage
          ◆Control Variables:#0194 SV: My X = Math.round(this.character(0)._realX)
          ◆Control Variables:#0195 SV: My Y = Math.round(this.character(0)._realY)
          ◆Set Event Location:This Event, ({SV: My X},{SV: My Y})
          ◆Script:this.character(0)._locked = true;
          ◆Set Movement Route:This Event (Skip, Wait)
          :Set Movement Route:◇Blend Mode:Additive
          :Set Movement Route:◇Speed:5
          :Set Movement Route:◇Turn toward Player
          :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX BLASTAWAY (100, 100, 0)
          ◆Loop
            ◆Control Variables:#0194 SV: My X = Math.round(this.character(0)._realX)
            ◆Control Variables:#0195 SV: My Y = Math.round(this.character(0)._realY)
            ◆Set Movement Route:This Event (Skip, Wait)
            :Set Movement Route:◇1 Step Backward
            ◆Control Variables:#0244 SV: KB X = Map X of This Event
            ◆Control Variables:#0245 SV: KB Y = Map Y of This Event
            ◆If:SV: KB X = SV: My X
              ◆If:SV: KB Y = SV: My Y
                ◆Break Loop
                ◆
              :End
              ◆
            :End
            ◆
          :Repeat Above
          ◆Set Movement Route:This Event (Skip, Wait)
          :Set Movement Route:◇Blend Mode:Normal
          :Set Movement Route:◇Speed:4
          :Set Movement Route:◇Wait:5 frames
          ◆Script:this.character(0)._locked = false;
          ◆
        :End

4-I think if an enemy is standing on the tile directly in front of Form 1 or 2, they aren’t knocked back for some reason? I saw at least one time where an enemy a tile away was knocked back fine, but consistently if an enemy is right in front then no knockback will happen.

5-The Form 6 Wandering Attack is nearly functional! Though it appears to be registering a hit even if it passes an enemy to the direct side, without moving into them at all.

6-With the Form 8 Trap, enemies will walk into the side of the trap, pause when they get hit (even though they are standing to the side of the trap and not on it), then walk right through it. They do take continual damage with the ≠ 6 check though, so that is great.

  1. Nice!
  2. That reads right.
  3. I’m wondering if you were punching right before pressing S. An enemy only gets re armed when ATTACKING goes OFF or Hit Count goes up. If S starts while a punch is still out, ATTACKING never goes OFF in between, so the enemy you just punched is still marked as hit and the blast can’t touch it. Form 1 also doesn’t place the collision, so if a punch is still out, the blast starts from wherever the punch left it, which can be past the enemy in front. The one in front is usually the one you just punched, which would explain why it’s always that one.

Adding Hit Count += 1 under ATTACKING = ON re arms everything when the attack starts, and the AtkDir branches from Form 4 put the collision back on you facing the right way. Here’s Form 1 with both in:

◆If: VITAL SHAPE = 1
  ◆Control Variables: #0197 ATTACK TYPE = 5
  ◆Control Variables: #0225 Move Power = 130
  ◆Set Movement Route: Player (Wait)
    : Blend Mode: Screen
    : SE: Maris Haven SFX/Fighting/BSFX QUICK HIT (100, 100, 0)
    : Jump: +0, +0
    : Blend Mode: Normal
  ◆Common Event: SCREENSHAKE MEDIUM
  ◆Control Switches: #0181 ATTACKING = ON
  ◆Control Variables: #0242 Hit Count += 1
  ◆Control Variables: #0213 AtkX = Map X of Player
  ◆Control Variables: #0214 AtkY = Map Y of Player
  ◆Control Variables: #0215 AtkDir = Direction of Player
  ◆If: AtkDir = 2
    ◆Set Event Location: Attack collision, ({AtkX},{AtkY}) (Direction: Down)
  ◆End
  ◆If: AtkDir = 4
    ◆Set Event Location: Attack collision, ({AtkX},{AtkY}) (Direction: Left)
  ◆End
  ◆If: AtkDir = 6
    ◆Set Event Location: Attack collision, ({AtkX},{AtkY}) (Direction: Right)
  ◆End
  ◆If: AtkDir = 8
    ◆Set Event Location: Attack collision, ({AtkX},{AtkY}) (Direction: Up)
  ◆End
  ◆Set Movement Route: Attack collision (Wait)
    : SE: Maris Haven SFX/Fighting/BSFX SMACK (100, 100, 0)
    : Image: MH VitalAttacks1(6)
    : Transparent OFF
    : Speed: 6
    : 1 Step Forward
    : 1 Step Forward
    : Transparent ON
  ◆Control Switches: #0181 ATTACKING = OFF
  ◆Control Switches: #0182 MOVEMENT ATTACK = OFF
  ◆Control Switches: #0187 PREVENTER = OFF
◆End

Form 2 gets the same Hit Count line under its ATTACKING = ON. I’d also swap its Set Event Location for the same AtkX, AtkY, AtkDir lines and four branches, so it always faces the way you are. The Hit Count line is worth putting in every attack that turns ATTACKING ON, so no attack can ever be blocked by the one before it. If it still happens when you haven’t punched first, does the enemy in front take the damage and just not move, or does it not get hit at all?

  1. That’s the ≤ 1 in the type 7 block. I had it checking the tiles next to the enemy back when the wander couldn’t move onto them. Now that it walks through enemies, change it to = 0 so it only hits what it’s actually on:
◆If: SV: Distance = 0
  1. Glad the continual damage is working. I think the side hits come from the enemy’s Map X and Y jumping onto the trap the moment it starts stepping toward it, so the hit lands while it still looks like it’s beside it. Rounding the enemy’s position the same way as the collision’s should fix that. In the hit section, change the two lines right above the five damage lines to these:
◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)

That makes every attack wait until the enemy is more than halfway onto the tile, so it should line up better everywhere, not just on the trap. With type 6 in the ≠ check now, the type 6 re arm block at the top of the hit section isn’t doing anything, so it can stay or go.

3-Fully functional!

4-So first of all, you say that every single attacking technique in the game that turns ATTACKING=ON should have a Hit Count+1 under that line?
Second of all, Form 1 is fully functional now!
Form 2’s S attack is almost fully functional.
Sometimes it will hit multiple enemies, and one will only get knocked back for a moment.
Sometimes also, it will HIT an enemy but it won’t get knocked back, one time I don’t think it even took damage/flashed at all.
Also, this is another one where enemies can get knocked back if they are next to the side of it.
But also, rarely, in a group of enemies I’ve seen one walk on top of it from the side, and stay totally fine with no damage.
Maybe these are more shenanigans where they’re technically “blocking” each other by beginning to walk onto the tile behind them, but I really dunno.
Should every S-attack have the functionality that doesn’t let enemies take damage if they’re standing next to it? How would that go about happening?

5-Fully functional!

6-Where exactly do those 2 lines go? Right above attack type 4’s damage block?

3 and 5. Nice!

  1. Yes, right under each ATTACKING = ON. The one thing to watch is that it only runs once when the attack starts. Somewhere that runs every frame would re arm every enemy every frame.

The side hits on Form 2 are what the two lines in 6 fix. They go in the hit section every attack shares, so once they’re in, every S attack waits until the enemy is more than halfway onto the tile. Nothing extra is needed per attack.

The one that only gets knocked back for a moment might be the stop rule. Everything the S hits gets pushed the same direction, so a second enemy can run into the first one and stop there. Getting hit but not moving could be the same thing. If a wall or another enemy is right behind it, the first step fails and the loop ends right away, so it flashes and takes the damage but stays put.

For the one that walked on and took nothing, and the one that didn’t flash at all, I’m wondering if those had already been hit once during that same S. Last Hit lets each enemy take one hit per attack, so one that gets pushed off and walks back on while the collision is still out gets skipped. Has Form 2 gotten the Hit Count line yet? Without it, an enemy you punched right before the S gets skipped the same way.

  1. They replace the SV: My X = Map X of This Event and SV: My Y = Map Y of This Event lines right after the End of the ATTACK TYPE = 2 block. So they sit a little above type 4, with the five damage lines in between:
    ◆If: ATTACK TYPE = 2
      (unchanged)
    ◆End
    ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
    ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
    ◆Control Variables: #0232 SV: Damage = Player ATK
    ◆Control Variables: #0232 SV: Damage *= Move Power
    ◆Control Variables: #0233 SV: Def Calc = SV: This Event DEF
    ◆Control Variables: #0233 SV: Def Calc += 100
    ◆Control Variables: #0232 SV: Damage /= SV: Def Calc
    ◆If: ATTACK TYPE = 4

The pair inside the type 6 block at the top stays as it is.

4- Ok, I put a Hit Count under every instance of Attacking=on, I think.
Do Form 6’s Wandering Attack, and Form 8’s Screenwide Attack and Trap also get them?
I just ask because they’re probably the most unique moves.

Form 2’s S Attack is still weird.
The side hits are indeed fixed, they don’t happen anymore.
Multiple times, I attacked an enemy, and they very visibly snapped to the tile right in front of me, and then didn’t get knocked back, whether there was an enemy behind them or not.
Enemies being knocked back is just as consistent as them not.

The attack does have a Hit Count under Attacking On.

The player is forced to stand still until the Attack Collision disappears, if that helps, but IDK how it would play into anything.

6-Enemies will walk through the side of the trap just fine without pausing, but now it seems like the consistent damage if they stay on top of the trap has stopped. They take damage again only once they walk off the trap. Is this one that should not have a Hit Count?

  1. Yes, all three, once when each one starts.

On Form 2, next time one snaps and doesn’t move, which way is it facing while it flashes? The knockback turns it to face you and then steps it backward. If it’s facing you, the push is aimed the right way and something is stopping the step. If it’s facing away from you, it’s being pushed into you, and you’re what’s blocking it.

Also, is it only the ones that were mid step when the blast came out, the ones with the big snap? Or does an enemy that’s already standing still in front of you do it too? A screenshot of Form 2’s S block as it is now would help too, since it’s changed a few times since the last one I saw.

  1. The Hit Count isn’t it. That only runs once when the trap goes down. Getting hit once and then again as they step off sounds like the trap’s hit is marking Last Hit. The block at the top clears it as soon as they start stepping off, and the rounded position still has them on the trap for that first half step, so they take one more. Is the ≠ 6 still in the check at the bottom? Also check that the type 6 branch doesn’t have its own Last Hit = Hit Count line.

4-Here is form 2’s S block.

◆If:VITAL SHAPE = 2
  ◆Control Variables:#0197 ATTACK TYPE = 5
  ◆Control Variables:#0225 Move Power = 130
  ◆Set Movement Route:Player (Skip, Wait)
  :Set Movement Route:◇Blend Mode:Screen
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX RISING (100, 150, 0)
  :Set Movement Route:◇1 Step Backward
  ◆Set Movement Route:Player (Skip, Wait)
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇Speed:4
  :Set Movement Route:◇Blend Mode:Normal
  ◆Common Event:SCREENSHAKE MEDIUM
  ◆Control Switches:#0181 ATTACKING = ON
  ◆Control Variables:#0242 Hit Count += 1
  ◆Control Variables:#0213 AtkX = Map X of Player
  ◆Control Variables:#0214 AtkY = Map Y of Player
  ◆Control Variables:#0215 AtkDir = Direction of Player
  ◆If:AtkDir = 2
    ◆Control Variables:#0210 ShieldY += 1
    ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Down)
    ◆
  :End
  ◆If:AtkDir = 4
    ◆Control Variables:#0209 ShieldX -= 1
    ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Left)
    ◆
  :End
  ◆If:AtkDir = 6
    ◆Control Variables:#0209 ShieldX += 1
    ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Right)
    ◆
  :End
  ◆If:AtkDir = 8
    ◆Control Variables:#0210 ShieldY -= 1
    ◆Set Event Location:Attack collision, ({AtkX},{AtkY}) (Direction: Up)
    ◆
  :End
  ◆Set Movement Route:Attack collision (Skip, Wait)
  :Set Movement Route:◇Stepping Animation ON
  :Set Movement Route:◇Script:$gameMap.event(63).setPriorityType(2);
  :Set Movement Route:◇Image:MH VitalAttacks1(7)
  :Set Movement Route:◇Transparent OFF
  :Set Movement Route:◇Speed:6
  :Set Movement Route:◇1 Step Forward
  :Set Movement Route:◇SE:Maris Haven SFX/Fighting/BSFX BIG HIT 2 (100, 100, 0)
  :Set Movement Route:◇Opacity:200
  :Set Movement Route:◇Wait:60 frames
  :Set Movement Route:◇Opacity:150
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Opacity:100
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Opacity:50
  :Set Movement Route:◇Wait:5 frames
  :Set Movement Route:◇Stepping Animation OFF
  :Set Movement Route:◇Transparent ON
  :Set Movement Route:◇Script:$gameMap.event(63).setPriorityType(1);
  :Set Movement Route:◇Opacity:255
  :Set Movement Route:◇Blend Mode:Normal
  ◆Control Switches:#0181 ATTACKING = OFF
  ◆Control Switches:#0182 MOVEMENT ATTACK = OFF
  ◆Control Switches:#0187 PREVENTER = OFF
  ◆
:End

I saw one enemy that was a full tile away from me, instantly snap to being directly in front of me upon walking too close to the Attack Collision. It was facing me and I don’t THINK it got launched back but i don’t recall.

In one instance, three enemies got hit. The first one got launched and so did the third one, but the second one did not.
Then, soon after, two enemies got hit in quick succession, and the first one got launched and the second did not.

It seems to be MOSTLY working, but there are some odd anomalies.

6-Yes, and Attack Type 6’s damage handler DOES have a last hit=hit count line. I removed it, but the enemies still take only one hit while remaining standing on the trap. They don’t take damage again until they step back on.

  1. That block reads right, so I’m wondering if those are the stop rule again, just in a tighter window. The collision sits on that tile for over a second, so enemies keep walking into it after the first one gets launched. Everything it hits gets pushed the same way, so the second one’s first step lands on the path the first one is still flying along. The first one moves one tile per route, and if it hasn’t cleared the next tile yet when the second one tries to step, that step fails and the loop ends right away. That would fit the first and third getting launched but not the second, since by the time the third got hit, the first one was long gone.

What if you gave it one retry before giving up? SV: KB Retry is a new self variable. Set it to 0 right above the Loop, and swap the Break Loop in the type 5 branch for this:

◆If: SV: KB Retry = 0

◆Control Variables: #0XXX SV: KB Retry = 1

◆Wait: 10 frames

: Else

◆Break Loop

◆End

That lets it wait out one blocked step and try again. The catch is that an enemy that hits a wall will sit there flashing for 10 more frames before it ends.

  1. Since it still only hits once, something is still setting Last Hit. Is the ≠ 6 nested inside the ≠ 3, the same way ≠ 3 sits inside ≠ 1, with the Last Hit line inside all three? If ≠ 6 is its own If below the other two, the Last Hit line runs before ≠ 6 ever gets checked. If it’s already nested, a screenshot of the bottom of the hit section would help.

4-Will this affect other attacks that have Type 5? Also, will the extended period of waiting and flashing be remedied by making the 10 frames be 1 frame?

If it would be easier for Type 2’s S to be totally rewritten, or changed somehow to remove the problem point, I’d be fine with it to an extent. Same deal with 6.

(edit-That being said i may have been a bit presumptive cause it seems the problem has stopped! There is still a visible snap to the tile that Attack Collision is on when the enemy walks into it though, but if that already only applies to half the tile then I take it there’s nothing really to do about it since they have to be there to be knocked back.)

6-

Any thoughts?

  1. Glad it’s stopped! If it stopped before you added the retry, I’d leave the retry out. If you did add it, it only does anything when a knockback step is blocked, so other type 5 attacks that move freely won’t notice it. I wouldn’t go down to 1 frame, though. At speed 5, an enemy takes about 8 frames to cross a tile, so 1 frame isn’t enough time for the one in front to get out of the way, and the retry would just fail again. Somewhere around 8 frames should be enough.

The snap is fine to leave. It only shows when an enemy gets hit mid step, since it has to be placed on a tile before it can be pushed.

  1. That nesting looks right, so the Last Hit line at the bottom shouldn’t be catching the trap anymore. Could you try a quick test? Right under If: SV: Last Hit ≠ Hit Count, add this:
◆If: ATTACK TYPE = 6
  ◆Play SE: Cursor1 (90, 100, 0)
◆End

Then let an enemy stand on the trap. If it beeps over and over, the hit is getting through and something lower down, maybe the position check, is stopping it. If it beeps once and goes quiet, something else is still setting Last Hit, and I’d search the enemy’s page for any other SV: Last Hit lines.

So there should only be one instance of the SV: Last Hit = Hit Count in the entire enemy code?

There’s one in Attack Type 4 just below the setting lines like SV: Damage and Def Calc.
And one in Attack Type 7 just below it.
And one in Attack Type 0 down where the damage is calculated.

No, types 4 and 7 should keep theirs. Those two sit outside the position check, so the check at the bottom never reaches them, and they need their own.

The one in type 0 can come out, though. The check at the bottom already covers type 0. I’m wondering if that’s the trap problem too. If that line isn’t tucked inside the If: ATTACK TYPE = 0 branch, it runs for every attack, including the trap, and marks it as hit right away. Try removing it and see if the trap starts hitting continuously again.

Nope, they’re still only taking one point of damage when they stand on it.

This is the code I’ve got. It doesn’t actually seem to be beeping at all.

Since it never beeps, not even on that first hit, I don’t think the trap is hitting as type 6 at all. I’m wondering if ATTACK TYPE is still 3 when the trap goes down, or if something changes it after. Type 3’s branch only hits once, so that would fit.

Could you check the ATTACK TYPE line in Form 8’s trap block and make sure it says 6? If it does, try moving the Play SE out of the If: ATTACK TYPE = 6 so it beeps for any attack. If it beeps then, something is changing the type while the trap is out. A screenshot of the trap block would help too.

So y’know how I mentioned it’s always the small stuff that trips me up?
It was set to 7…changed that to 6, and it works now.

Fairly embarrassing to find that out, but at least it’s fixed. Thank you very much.

It’s approaching the final few miscellaneous battle system issues before moving onto the enemy’s attacking ability. I’ll collect them all together and send them all at once.

As it stands now, these are the final miscellaneous battle system issues before moving on to the enemy’s attacking ability. 1, 2, and 6 are all related.

1-Here are Form 7’s A - action calculations, I know they’re wrong, but I don’t know how to set the numbers, lol. We want Attack to be boosted by 50 percent and Defense to be lowered by 35 percent, then returned to normal after the timer.

2-How can we change the player’s stats per form, so that some forms have higher or lower ATK and DEF? Can it be its own parallel process that sets stats based on the form variable, that is turned off by a switch when a stat boost is active? (HP won’t be touched.)

3-Form 5’s A and S actions are not done and they have been saved until last, because it’s a fairly complicated Form. I’m still discussing the details with my co-developer, so just saying that’s something that will come up later.

4-The spawning system for the enemies is kinda janky. I want there to be max 6 enemies onscreen at any given time, and no more can spawn if 6 are onscreen-they must wait until the next one is defeated. As it stands, every enemy will spawn in after you defeat 1, 2 at most.

  ◆Comment:This code block causes this event to pause if there are too
  :Comment:many enemies onscreen.
  :Comment:
  :Comment:Once there are less than 6, it is allowed to continue.
  :Comment:
  :Comment:vvvvv
  ◆Label:Check
  ◆If:Enemies Onscreen RN? ≥ 2
    ◆Comment:If this is true, then do nothing. 6+ is too many.
    :Comment:
    :Comment:Remember, Enemies Onscreen RN must be added to by 1 upon these
    :Comment:events spawning in, and subtracted by 1 once one is defeated.
    ◆Comment:This code block decides how long the event will wait before
    :Comment:checking if 3 enemies are onscreen again.
    ◆Control Variables:#0191 SV: How long do I wait? = Random 1..6
    ◆If:SV: How long do I wait? = 1
      ◆Wait:60 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 2
      ◆Wait:120 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 3
      ◆Wait:180 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 4
      ◆Wait:240 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 5
      ◆Wait:270 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 6
      ◆Wait:300 frames
      ◆
    :End
    ◆Jump to Label:Check
    ◆
  :Else
    ◆Comment:This code block decides how long the event will wait before
    :Comment:continuing on to the next event, to keep spawning from
    :Comment:bunching up.
    ◆Control Variables:#0191 SV: How long do I wait? = Random 1..6
    ◆If:SV: How long do I wait? = 1
      ◆Wait:60 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 2
      ◆Wait:120 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 3
      ◆Wait:180 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 4
      ◆Wait:240 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 5
      ◆Wait:270 frames
      ◆
    :End
    ◆If:SV: How long do I wait? = 6
      ◆Wait:300 frames
      ◆
    :End
    ◆Jump to Label:GO ONWARD TWO
    ◆
  :End
  ◆Label:GO ONWARD TWO
  ◆Comment:-
  :Comment:-
  :Comment:-
  :Comment:-
  :Comment:-
  :Comment:-
  ◆Comment:This event checks to see if six have already spawned, by refernencing
  :Comment:the number of the variable that is added by 1 to every time one of these
  :Comment:events successfully spawns. If six have already spawned, this event
  :Comment:will roll to see if they will spawn themselves. If they decide not to spawn,
  :Comment:they add 1 to "ENEM WON AGAINST." Once that variable reaches 12, the player
  :Comment:wins.
  ◆If:ENEMY AMOUNT SPAWNED ≥ 6
    ◆Control Variables:#0187 Will I spawn? = Random 1..2
    ◆If:Will I spawn? = 1
      ◆Jump to Label:GO ONWARD THREE
      ◆
    :Else
      ◆Control Variables:#0188 ENEMIES WON AGAINST += 1
      ◆Exit Event Processing
      ◆
    :End
    ◆
  :Else
    ◆Jump to Label:GO ONWARD THREE
    ◆
  :End
  ◆Label:GO ONWARD THREE
  ◆Comment:Right after all this waiting, the enemy is counted as onscreen,
  :Comment:to prevent spawn bunching.
  ◆Control Variables:#0184 Enemies Onscreen RN? += 1

5-I would like there to be a button toggle that locks the player from moving around with the arrow keys, so they only turn in place when pressing them. Can I do this, with a parallel process and switches I assume?

6-I’d like there to be certain items that boost the player’s stats independently of any other stat boosts. Like for instance, the player can use a Form action that 1.5x their ATK for 10 seconds before resetting. At the same time, they can use an item that also 1.5x their ATK for 10 seconds before resetting. I’d like these to be independent of each other, so that one resetting to 0 doesn’t immediately negate the other boost.