Discuss Scratch

scratchering_coder
Scratcher
500+ posts

How to ad an enemy in a 3D maze

I want to add an enemy in a 3D maze but i don't really know how to do it. Can someone know how to do it?

Like the 3D griffpatch laser tag that have enemys
-TAGM-
Scratcher
56 posts

How to ad an enemy in a 3D maze

well, its a bit complicated, first of all, u need to draw the enemy with pen, then u have to code it in a way so that it can find the player, u must also put all the players script on the enemy sprite so that the enemy is acting just like the player, this way, if the player has a bug, then the enemy has the same bug so it is easier to fix. u must also add a variable called “kill” that means that if the enemy touches u, then ur kill point will increase by 1, if u get 3 kill points then u can code:
when green flag clicked
if <> then
<(kill) = [3]>
broadcast [dead]
end

when I receive [dead]
say [you loose, click the green flag to start over]

there u go, i could not explain much but i hope this helps
scratchering_coder
Scratcher
500+ posts

How to ad an enemy in a 3D maze

-TAGM- wrote:

well, its a bit complicated, first of all, u need to draw the enemy with pen, then u have to code it in a way so that it can find the player, u must also put all the players script on the enemy sprite so that the enemy is acting just like the player, this way, if the player has a bug, then the enemy has the same bug so it is easier to fix. u must also add a variable called “kill” that means that if the enemy touches u, then ur kill point will increase by 1, if u get 3 kill points then u can code:
when green flag clicked
if <> then
<(kill) = [3]>
broadcast [dead]
end

when I receive [dead]
say [you loose, click the green flag to start over]

there u go, i could not explain much but i hope this helps

Yes, i know that but how i render it on the screen that moves and when it comes to you and it changes position like baldi basics i know how to make a 3D maze but the problem is i don't know how to add the enemy like baldi basics that baldi is the enemy
L_Blaster_MD
Scratcher
2 posts

How to ad an enemy in a 3D maze

Maybe Something like this?
when green flag clicked
forever
if <<touching [ Raycast] >> then
pen down
end
end
And
when green flag clicked
forever

if <(distance to [ player]) < [100]> then
point in direction ( Player)
move () steps
end
end

Last edited by L_Blaster_MD (Nov. 14, 2023 20:55:20)

Powered by DjangoBB