Discuss Scratch

zion95
Scratcher
5 posts

how do i make a npc follow the player and attack

pls
medians
Scratcher
1000+ posts

how do i make a npc follow the player and attack

You can make the npc point towards the player using this block:

And use the move steps block to move it towards the player at a certain speed:

This block will move based on the direction faced too, rather than just by x or y.
zion95
Scratcher
5 posts

how do i make a npc follow the player and attack

what about attack
medians
Scratcher
1000+ posts

how do i make a npc follow the player and attack

zion95 wrote:

what about attack
It depends what you mean by “attack”. You could just make a health variable for the player and lower it when the npc touches the player.

Last edited by medians (Feb. 6, 2023 00:05:37)

zion95
Scratcher
5 posts

how do i make a npc follow the player and attack

no like how do i make the npc follow staying on the ground while shooting an attack and it will show next lvl
medians
Scratcher
1000+ posts

how do i make a npc follow the player and attack

zion95 wrote:

no like how do i make the npc follow staying on the ground while shooting an attack and it will show next lvl
Then you can create a bullet sprite to shoot and create clones of (note that clones receive broadcasts). It depends where the ground is and if it is on a sprite or is colored or not.
Also, you can quote posts by clicking the quote button.
zion95
Scratcher
5 posts

how do i make a npc follow the player and attack

medians wrote:

zion95 wrote:

no like how do i make the npc follow staying on the ground while shooting an attack and it will show next lvl
Then you can create a bullet sprite to shoot and create clones of (note that clones receive broadcasts). It depends where the ground is and if it is on a sprite or is colored or not.
Also, you can quote posts by clicking the quote button.
oh ty
clelia773261
New Scratcher
1 post

how do i make a npc follow the player and attack

how do i make a npc attack a player without touching a button

Powered by DjangoBB