Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ExMove { ExMove_(GetClipMinY+120, 10, rand(40, 60)); }
- function ExMove_(height, ud, length) {
- if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){
- if(GetPlayerX < GetEnemyX) {
- if(GetEnemyX - length <= GetClipMinX+20) {
- ObjMove_SetDestAtWeight(objEnemy, GetEnemyX + length+20, rand(height+4 - ud, height + ud), 15, 3);
- } else {
- ObjMove_SetDestAtWeight(objEnemy, GetEnemyX - length-20, rand(height - ud, height + ud), 15, 3);
- }
- } else {
- if(GetEnemyX + length >= GetClipMaxX-20) {
- ObjMove_SetDestAtWeight(objEnemy, GetEnemyX - length-20, rand(height - ud, height + ud), 15, 3);
- } else {
- ObjMove_SetDestAtWeight(objEnemy, GetEnemyX + length+20, rand(height - ud, height + ud), 15, 3);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement