# Gadfly King Final Boss

**URL:** <https://community.flowlab.io/t/gadfly-king-final-boss/47613>\
**Category:** Help Requests\
**Created:** [October 17, 2026, 7:45pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613 "2026-10-17T19:45:18Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 17, 2026, 7:45pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/1 "2026-10-17T19:45:18Z")

</div>

After so many weeks of hard work, Im almost finished with the game…now I have to create the code for the final boss, Master Calamity! I want him to shoot bolts of lightning that act as homing missles that disappear when the player strikes the lightning bolts, as well as a health bar for Master Calamity. How can I pull this off? I’m very excited to finish this game and credit everyone who had helped me with the development of it.

> **[Flowlab.io - The Gadfly King](https://flowlab.io/game/edit/3143637)**
>
> Up Down Left and Right Keys to Move, Space Bar to Attack.

---

<div class="post-metadata">

**Author:** ![jamesKuk](https://community.flowlab.io/user_avatar/community.flowlab.io/jameskuk/32/64372_2.png) [@jamesKuk](https://community.flowlab.io/u/jamesKuk)\
**Post date:** [October 18, 2026, 12:05am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/2 "2026-10-18T00:05:17Z")

</div>

@DisastaBasta23 You can attach the Proximity(getting the position of the player) and the Point At blocks together to make the lightning track the player(needs a trigger). Then, the lightning can be Velocity block-ed to the target. You can make a collision or sensor block to check if there is a player strike nearby, and if so make the lightning destroy itself.

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 18, 2026, 12:50am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/3 "2026-10-18T00:50:33Z")

</div>

Got it. As for the health bar and damage, I want Calamity to take damage depending on the player’s attack power that they gained fighting enemies through the game. Also, I want the sprite to rotate like a actual thunderbolt. How do I do this?

---

<div class="post-metadata">

**Author:** ![LaCroixSparklingWater](https://community.flowlab.io/user_avatar/community.flowlab.io/lacroixsparklingwater/32/70857_2.png) [@LaCroixSparklingWater](https://community.flowlab.io/u/LaCroixSparklingWater)\
**Post date:** [October 19, 2026, 4:52pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/4 "2026-10-19T16:52:18Z")

</div>

hi, I hope your pfp is just a baby picture, cause its a pretty bad thing to show a picture of your face at a young age.

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 24, 2026, 9:17pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/5 "2026-10-24T21:17:26Z")

</div>

can we not get off topic? Still need help with this

---

<div class="post-metadata">

**Author:** ![Glob\_wars](https://community.flowlab.io/user_avatar/community.flowlab.io/glob_wars/32/72130_2.png) [@Glob\_wars](https://community.flowlab.io/u/Glob_wars)\
**Post date:** [October 24, 2026, 11:54pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/6 "2026-10-24T23:54:33Z")

</div>

For the damage based on the enemies killed you can add like .1 to a save value called like damage and when ever you attack something that has say 100 health you can take off your normal damage times the damage save +1. So if you normally take off 10 health but you killed 5 enemies so your damage value would be .5 it would multiply 10 \* 1.5 to take off 15 damage

---

<div class="post-metadata">

**Author:** ![Glob\_wars](https://community.flowlab.io/user_avatar/community.flowlab.io/glob_wars/32/72130_2.png) [@Glob\_wars](https://community.flowlab.io/u/Glob_wars)\
**Post date:** [October 24, 2026, 11:56pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/7 "2026-10-24T23:56:19Z")

</div>

And what do you mean sprite to rotate like an actual thunderbolt so I can help you

---

<div class="post-metadata">

**Author:** ![CoDer](https://community.flowlab.io/user_avatar/community.flowlab.io/coder/32/71719_2.png) [@CoDer](https://community.flowlab.io/u/CoDer)\
**Post date:** [October 25, 2026, 4:43am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/8 "2026-10-25T04:43:07Z")

</div>

Rotating the sprite is not hard but you would need pathfinding for the lightning bolts

---

<div class="post-metadata">

**Author:** ![CoDer](https://community.flowlab.io/user_avatar/community.flowlab.io/coder/32/71719_2.png) [@CoDer](https://community.flowlab.io/u/CoDer)\
**Post date:** [October 25, 2026, 4:45am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/9 "2026-10-25T04:45:14Z")

</div>

You can use this games code:

> **[Flowlab.io - Basic Enemy Follow (Top-Down)](https://flowlab.io/game/play/3062194)**
>
> WSAD / Arrow Keys to move \*\*\* The code could be made simpler using Expressions, but that would make it harder to understand \*\*\* Platformer / Side-Scrolling version: https://flowlab.io/game/play/2996831

(Credit to @thebrickccentric)

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 28, 2026, 7:15am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/10 "2026-10-28T07:15:29Z")

</div>

i know of the rotation behavior, so maybe a piece of code involving that?

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 28, 2026, 7:28am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/11 "2026-10-28T07:28:18Z")

</div>

nevermind, i figured it out (i think). As for Calamity’s health taking damage depending on the attack power, i could use a global, but what should the code look like?

---

<div class="post-metadata">

**Author:** ![CoDer](https://community.flowlab.io/user_avatar/community.flowlab.io/coder/32/71719_2.png) [@CoDer](https://community.flowlab.io/u/CoDer)\
**Post date:** [October 28, 2026, 12:59pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/12 "2026-10-28T12:59:05Z")

</div>

Do you want the attack power to go up or be based on distance or something else?

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [October 29, 2026, 1:45am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/13 "2026-10-29T01:45:49Z")

</div>

to go up with every enemey you clear from the previous levels, and when you fight Calamity the current attack power you gained so far is the attack power you use to attack Calamity

---

<div class="post-metadata">

**Author:** ![CoDer](https://community.flowlab.io/user_avatar/community.flowlab.io/coder/32/71719_2.png) [@CoDer](https://community.flowlab.io/u/CoDer)\
**Post date:** [October 29, 2026, 1:49pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/14 "2026-10-29T13:49:11Z")

</div>

For that you’d want a global variable that adds +1 value every time you kill an enemy then scales damage. I will work on an example code for you.

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [November 16, 2026, 11:37pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/15 "2026-11-16T23:37:07Z")

</div>

okay, thanks. by the way, since it’s been a while, do i continue a new topic?

---

<div class="post-metadata">

**Author:** ![CoDer](https://community.flowlab.io/user_avatar/community.flowlab.io/coder/32/71719_2.png) [@CoDer](https://community.flowlab.io/u/CoDer)\
**Post date:** [November 17, 2026, 12:13am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/16 "2026-11-17T00:13:06Z")

</div>

Not if ur the owner.

---

<div class="post-metadata">

**Author:** ![DisastaBasta23](https://community.flowlab.io/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@DisastaBasta23](https://community.flowlab.io/u/DisastaBasta23)\
**Post date:** [November 17, 2026, 12:19am UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/17 "2026-11-17T00:19:03Z")

</div>

Great, so can you give me the example code?

---

<div class="post-metadata">

**Author:** ![LaCroixSparklingWater](https://community.flowlab.io/user_avatar/community.flowlab.io/lacroixsparklingwater/32/70857_2.png) [@LaCroixSparklingWater](https://community.flowlab.io/u/LaCroixSparklingWater)\
**Post date:** [November 17, 2026, 9:33pm UTC](https://community.flowlab.io/t/gadfly-king-final-boss/47613/18 "2026-11-17T21:33:21Z")

</div>

I mean, you could just follow what he said…
