Mewkyuu

v0.12m functions and other stuff too

Aug 27th, 2011
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.66 KB | None | 0 0
  1. let ThisEnemy;
  2.  
  3. @Initialize {
  4. ThisEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS); ObjEnemy_Regist(ThisEnemy);
  5. DeleteShotAll(TYPE_ALL, TYPE_ITEM);
  6. }
  7.  
  8. @MainLoop {
  9. yield;
  10. }
  11.  
  12.  
  13.  
  14. // Motion functions
  15. function SetX(x) { ObjMove_SetX(ThisEnemy,x); }
  16. function SetY(y) { ObjMove_SetY(ThisEnemy,y); }
  17. function SetXY(x,y) { ObjMove_SetPosition(ThisEnemy,x,y); }
  18. function SetSpeed(v) { ObjMove_SetSpeed(ThisEnemy, v); }
  19. function SetAngle(ang) { ObjMove_SetAngle(ThisEnemy, ang); }
  20. function GetX(x) { return ObjMove_GetX(ThisEnemy); }
  21. function GetY(y) { return ObjMove_GetY(ThisEnemy); }
  22. function GetSpeed(v) { return ObjMove_GetSpeed(ThisEnemy); }
  23. function GetAngle(ang) { return ObjMove_GetAngle(ThisEnemy); }
  24. function SetMovePosition01(newX, newY, v) { ObjMove_SetDestAtSpeed(ThisEnemy, newX, newY, v); }
  25. function SetMovePosition02(newX, newY, f) { ObjMove_SetDestAtFrame(ThisEnemy, newX, newY, f); }
  26. function SetMovePosition03(newX, newY, wht, maxV) { ObjMove_SetDestAtWeight(ThisEnemy, newX, newY, wht, maxV); }
  27. function SetPlayerX(x) { ObjMove_SetX(GetPlayerObjectID,x); }
  28. function SetPlayerY(y) { ObjMove_SetY(GetPlayerObjectID,y); }
  29.  
  30. // Bullet functions
  31. function CreateShot01(x,y,v,ang,graphic,delay) { CreateShotA1(x,y,v,ang,graphic,delay); }
  32. function CreateShot02(x,y,v,ang,vAcc,v2,graphic,delay) { CreateShotA2(x,y,v,ang,vAcc,v2,graphic,delay); }
  33. function CreateLaser01(x,y,v,ang,l,w,graphic,delay) { CreateLooseLaserA1(x,y,v,ang,l,w,graphic,delay); }
  34. function CreateLaserS01(x,y,ang,l,w,deletetime,graphic,delay) { CreateStraightLaserA1(x,y,ang,l,w,deletetime,graphic,delay); }
  35. function SetShotData01(objID,frame,v,ang,angVel,vAcc,v2,graphic) { ObjMove_AddPatternA3(objID,frame,v,ang,vAcc,angVel,v2,graphic) }
  36.  
  37. // Math functions
  38. //function logBASE(base,in) { return ((log10(in))/(log10(base))) }
  39. function randint(min,max) { return trunc(rand(min,max)) }
  40. //function trunc(num) { return truncate(num) }
  41. function abs(num) { return absolute(num) }
  42.  
  43. // Info functions
  44. function GetLife { return ObjEnemy_GetInfo(ThisEnemy, INFO_LIFE) }
  45. function OnEnemySpell { return ObjEnemy_GetInfo(ThisEnemy, INFO_IS_SPELL) }
  46. function OnEnemyLastSpell { return ObjEnemy_GetInfo(ThisEnemy, INFO_IS_LAST_SPELL) }
  47. function OnEnemySurvivalSpell { return ObjEnemy_GetInfo(ThisEnemy, INFO_IS_DURABLE_SPELL) }
  48. function OnEnemyLastLife { return ObjEnemy_GetInfo(ThisEnemy, INFO_IS_LAST_STEP) }
  49. function GetTimer { return ObjEnemy_GetInfo(ThisEnemy, INFO_TIMER) }
  50. function GetTimerInFrames { return ObjEnemy_GetInfo(ThisEnemy, INFO_TIMERF) }
  51. function GetSpellCardBonusScore { return ObjEnemy_GetInfo(ThisEnemy, INFO_SPELL_SCORE) }
  52. function GetRemainingLives { return ObjEnemy_GetInfo(ThisEnemy, INFO_REMAIN_STEP_COUNT) }
  53. function GetLife_ThisStep { return ObjEnemy_GetInfo(ThisEnemy, INFO_ACTIVE_STEP_LIFE_COUNT) }
  54. function GetMaxLife_ThisStep { return ObjEnemy_GetInfo(ThisEnemy, INFO_ACTIVE_STEP_TOTAL_MAX_LIFE) }
  55. function GetMissCountInThisSpell { return ObjEnemy_GetInfo(ThisEnemy, INFO_PLAYER_SHOOTDOWN_COUNT) }
  56. function GetBombCountInThisSpell { return ObjEnemy_GetInfo(ThisEnemy, INFO_PLAYER_SPELL_COUNT) }
  57. function SetTimer(time) { ObjEnemyBossScene_SetSpellTimer(ThisEnemy, time) }
  58. function SetPlayerInvincibility(frames) { SetPlayerInvincibilityFrame(frames) }
  59. function ExtendPlayer(num) { SetPlayerLife(GetPlayerLife+num) }
  60. function AddBomb(num) { SetPlayerLife(GetPlayerLife+num) }
  61. function CollectItems { CollectAllItems }
  62. function CollectCertainItems(type) { CollectItemsByType(type) }
  63. function ForbidShot(bool) { SetForbidPlayerShot(bool) }
  64. function ForbidBomb(bool) { SetForbidPlayerSpell(bool) }
  65. function IsForbidShot { return IsPermitPlayerShot }
  66. function IsForbidBomb { return IsPermitPlayerSpell }
  67. function SetPlayerPOC(y) { SetPlayerAutoItemCollectLine(y) }
  68.  
  69. // Enemy functions
  70. function SetLife(life) { ObjEnemy_SetLife(ThisEnemy, life) }
  71. function AddLife(life) { ObjEnemy_AddLife(ThisEnemy, life) }
  72. function SetDamageRate(shotResist, bombResist) { ObjEnemy_SetDamageRate(ThisEnemy, shotResist, bombResist) }
  73. function SetCollisionA(x, y, rad) { ObjEnemy_SetIntersectionCircleToShot(ThisEnemy, x, y, rad) }
  74. function SetCollisionB(x, y, rad) { ObjEnemy_SetIntersectionCircleToPlayer(ThisEnemy, x, y, rad) }
  75.  
  76. // Player functions
  77. function SetPlayerIntersectionCircle(px, py, rad, graze) { ObjPlayer_AddIntersectionCircleA1(GetPlayerObjectID, px, py, rad, graze) }
  78. function DeletePlayerHitbox { ObjPlayer_ClearIntersection(GetPlayerObjectID) }
  79. function SetRebirthFrame(frames) { SetPlayerRebirthFrame(frames) }
  80. function SetRebirthFrameReduction(frames) { SetPlayerRebirthLossFrame(frames) }
  81.  
  82. // Added functions
  83. function wait(w) { loop(w) { yield } }
Advertisement
Add Comment
Please, Sign In to add comment