Hey, You! That's right- I know that you are you! Alright. All silliness aside- I'm in need of help, just for a bit of code. Could anyone (experienced with Flash ActionScript 3.0) possibly give me some code for a homing attack? Yeah. I know that little. Great. But really, I really need some code which is like 2D Sonics homing attack? Just a basic one, with conditions being 1; the enemy must be within a certain range; and 2; Sonic smoothly, not just clipping/blinking over. I don't intend if any of this came out rude or demanding (if so, I apologize)- I am just asking the community for help. After all- Sonic Retro is Sonic Retro because of its community. Thank you.
This is not the appropriate subforum and if you have to ask about this, then you need to learn a lot. Anyway I did this pseudo code just because. Hope it helps. Code (Text): isPerformingHomingAttack:boolean isConnected:boolean targetX:integer targetY:integer ............. //this is in some loop range=100; moveSpeed=5; if(enemyX-range<playerX AND playerX < enemyX+range) if(enemyY-range<playerY AND playerY < enemyY+range) if(Button2 == Pressed) { isPerformingHomingAttack=true; targetX=enemyX; targetY=enemyY; } if(isPerformingHomingAttack) { if(playerX<targetX) { if(playerX+moveSpeed<targetX) playerX=playerX+moveSpeed; else { playerX=targetX; isConnected=true; } } if(targetX<playerX) { if(targetX<playerX-moveSpeed) playerX=playerX-moveSpeed; else { playerX=targetX; isConnected=true; } } if(playerY<targetY) { if(playerY+moveSpeed<targetY) playerY=playerY+moveSpeed; else { playerY=targetY; isConnected=true; } } if(targetY<playerY) { if(targetY<playerY-moveSpeed) playerY=playerY-moveSpeed; else { playerY=targetY; isConnected=true; } } } if(isConnected) { //do your rebound, special effects and kill badnik isPerformingHomingAttack=false; isConnected=false; }
But E&RE is specifically for hacking right? Maybe the Fangaming subforum should have its own Basic Q&A thread.
Yeah, I'll second the fact that it seems weird to make this subforum just a fangame circle jerk Surely it's about fangame development too, and questions pertaining to that stuff should be allowed. Probably doesn't keep things strictly organized but if that's the case then why have the fangame subforum at all?
Well, yeah! I reckon, maybe we should contact ScarredSun. She could create a subforum (or whatever they're called) for help. After all- Sonic Retro is getting an overhaul anyway, right?