ID:155166
![]() Aug 27 2011, 5:25 pm
|
|
How would I do this? I can see making the mob shooting a projectile once, but how do I get it to loop while the player is in front of it or behind it?
|
Ness that cycles through everyone in view, not a particular direction. To get only mobs above or below, I think you'd have to do something like this:
mob/NPC/proc/Look_Around() I spaced it out so it wouldn't look so cluttered. This doesn't give you the perfect AI code, but shows you how to do what your trying to do. Learn get_step and get_dist from "Help On..." under the Help tag in Dream Maker. I tried to explain it so you'd understand what everything does. Correct me if I'm wrong about anything Byondlings. |
*DM*
If the players (P) is in src's oview (make sure you check that), then if P is get_dist (a certain distance away), you'll shoot the blast every, say, 1 to 5 seconds, you choose.
*DM*
There is probably a better way. But I hope this helps you figure out how to program an NPC shooting projectiles at a player.