The following is important:
All units are sprites.
All units have player instance variable
The weapons have player instance variable
The hit range boxes have player instance vairbale
Units will launch weapon based on collision between source unit's hit box and target unit.
The unit will move in 4 directions.
Right now I am struggling with the ides of units firing projectiles based on movement angle.
All of my units inherit the bullet behavior. I want to get the units to fire their own weapon when they are close to the enemy unit at specific distance and angle of bullet motion.
I have studied the turret behavior for a little and felt very restrictive on control towards firing bullets at specific angles.
I also thought it can also be accomplished using the Pit feature for the hit detection boxes but unsure how to pin the hit detection boxes besides the default image point 0.
Any suggestions on how I can get the source unit to fire a weapon based on collision between source hit detectors and target unit (source player ID != target player ID upon collision)