0 votes

so I'm trying to make a space shooting game where it has 2 types of enemies, the 1st enemy will hit the player directly, and for the second one I want him to shoot and move to the right and left while moving towards the player, and the question is how to create the maneuverability in 2nd enemy ? should I calculate the enemy's position and move it when the position is over / equal to / near the viewport boundary? or have to do something else?

the 2nd enemy code is almost the same as the first but I I just added firepower and and also the enemy will appear in a random x position

i hope you can help me, thank you

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.