プレイ日記
Hudson awesomerobotguy
Does anybody know how to make enemies home in on a character?
2そうだね
プレイ済み
返信[1]
親投稿
Scientist Speedy1101
In your main loop, increment/decrement the sprite's X/Y until it comes in contact (or near) with the target sprite. You will need to use IF statement(s) and logic conditions to test the coordinates. I'll try to make an example program.
2そうだね
プレイ済み
返信[2]
親投稿
Autz sonic-HD8765
For smooth movement, i would recommend using ATAN, SIN and COS, since increasing/decreasing X and Y by conditional statements would produce an odd movement. Here's a sample code.
2そうだね
プレイ済み
返信[3]
親投稿
Scientist Speedy1101
Here's my really basic code. Great for making "robot" sprites move.
0そうだね
プレイ済み
返信[4]
親投稿
*J.P.*[P]£ aj2003aj
it took me hours to find thiS!!!
0そうだね
プレイ済み