TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Enemy shoots at Player. How?
Pages:
1
Enemy shoots at Player. How?
DioGio
Posts: 41
April 09, 2012, 03:45:41 am
Greetings,
I failed to write a behaviour that lets an enemy shoot a bullet in the direction of the Player. I tried to download behaviours from Forge, but they did not work either.
If someone could tell me how to set the Velocity towards the Player or could show me a working behaviour from Forge, that would be great!
Thankee, long Days and pleasant Nights, and may ya do well! (Steven King)
twotimingpete
Posts: 1667
April 09, 2012, 03:51:05 am
the "run and shoot" example game includes an enemy that does this. basically it sets a global number attribute under "always" to keep the player's X and another to keep the player's Y. then the shoot code uses a line of math to calculate the angle.
My Twitter
Zersixs
Posts: 14
April 09, 2012, 04:04:30 am
You can download premade behaviors at the StencylForge.
Pages:
1