Advertisement
Trickysticks

aaa

Mar 19th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function ExMove { ExMove_(GetClipMinY+120, 10, rand(40, 60)); }
  2. function ExMove_(height, ud, length) {
  3. if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){
  4. if(GetPlayerX < GetEnemyX) {
  5. if(GetEnemyX - length <= GetClipMinX+20) {
  6. ObjMove_SetDestAtWeight(objEnemy, GetEnemyX + length+20, rand(height+4 - ud, height + ud), 15, 3);
  7. } else {
  8. ObjMove_SetDestAtWeight(objEnemy, GetEnemyX - length-20, rand(height - ud, height + ud), 15, 3);
  9. }
  10. } else {
  11. if(GetEnemyX + length >= GetClipMaxX-20) {
  12. ObjMove_SetDestAtWeight(objEnemy, GetEnemyX - length-20, rand(height - ud, height + ud), 15, 3);
  13. } else {
  14. ObjMove_SetDestAtWeight(objEnemy, GetEnemyX + length+20, rand(height - ud, height + ud), 15, 3);
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement