0 Favourites

# How do I make a dashing boss

• 8 posts
• I'm trying to make a boss that moves around left and right and every once in a while dashes at the player. also the back would be the only weak spot.

this is what I have now and it's just not working very well... he stays in the dash animation (it's set to not looping and repeat once, 2 frames, speed 5). he doesn't always face the right direction either. no idea how to do the weak spot yet. And I guess I should so something where it checks if it's X is bigger or smaller than Player.X and then charge toward the player?

So something like this: https://youtu.be/0bKBnyDcipU?t=232

I'm also thinking having the boss crash into walls and rocks droppping from the ceiling then but I'm trying to get this basic behavior down first

• Hi,

I watched the video you referenced.

I think it is much simpler than all the weird stuff you have

So your boss is doing 2 things. 1) Moving after player and 2) Sometimes dashes at player.

So here is my suggestion to you:

Create 2 GLOBAL variables:

1) BOSS_moving = 1

2) BOSS_dashing = 0

Then you don't need all this direction stuff. The boss is simply going after the player in the video you referenced. So you simply say:

CONDITION #1: Player.X less than BOSS.X

and CONDITION #2: BOSS_moving = 1

ACTION = BOSS go left

CONDITION #1: Player.X more than BOSS.X

and CONDITION #2: BOSS_moving = 1

ACTION = BOSS go right

that's all there is to it for Part 1.

Then you have your Part 2: the dashing business. For this you simply say:

CONDITION #1: using SYSTEM every random(2,5) seconds

CONDITION #2: BOSS_moving = 1

ACTION #1: set BOSS_moving = 0

ACTION #2: set BOSS_dashing = 1

CONDITION: using SYSTEM >>> BOSS_dashing = 1

CONDITION: on end of animation of big BOSS badaboom

ACTION #1: set BOSS_moving = 1

ACTION #2: set BOSS_dashing = 0

And that's all there is to it

• CONDITION: using SYSTEM >>> BOSS_dashing = 1

CONDITION: on end of animation of big BOSS badaboom

ACTION #1: set BOSS_moving = 1

ACTION #2: set BOSS_dashing = 0

And that's all there is to it

personally id prefer to put it as :

CONDITION: on end of animation of big BOSS badaboom

ACTION #1: set BOSS_dashing = 0

ACTION #2: set BOSS_moving = 1

, its not much of a difference, but can create animation bugs if 2 are on at once. something to think about also, is whether damage is done pre animation, during animation, or post animation. by doing post animation you could implement a block feature, where is if dashing = 1, and on collision, -sub event - x pressed damage = 0, x not pressed damage =20. sorry, thats nowhere near as nice as the prior badabooms, but i tried.

• Thanks for the replies guys! I've been traveling but I can try this tomorrow.

edit: I tried this but the boss is just stuck in place in the dash animation... (I set it at speed 5, loop Yes, count 3, repeat to 0, ping pong No. It has 2 frames)

edit: actually the boss immediately dashes to the right (and then gets stuck there on an obstacle). I have no idea

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• The boss just keeps going to the right.

@the_Shit_hawk

@DolyGamesCosmos

Any ideas?

• You took out the code that makes direction 1 and 0 mean something. The reason it's still moving and toward the right is because it's set to a bullet. I sent a PM anyway.

• You took out the code that makes direction 1 and 0 mean something. The reason it's still moving and toward the right is because it's set to a bullet. I sent a PM anyway.

theres this, unless its just unshown.

could also do something like,

If dashing = 1, set boss bullet speed to 80 , set bullet angle to player.x,player.y , set boss bullet enabled, wait .3 seconds, set boss bullet enabled.

if boss is in collision with player - do 20 damage

subevent- Dashing = 1 - do 40 damage

this would allow you to leave bullet behavior as stated above, but would "rocket" the boss momentarily at the players exact position. you could also set angle to player.x,player.y , and add a wait, to instill a "keep moving" aspect to the game. instead of attacking your current position, they would attack where you were X seconds ago.

• It was just unshown.

It's working ok now, thanks to plinkie

• 8 posts