Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. Error Message:
  2.  
  3.  
  4. ___________________________________________
  5. ############################################################################################
  6. FATAL ERROR in
  7. action number 1
  8. of Step Event0
  9. for object obj_hopliteNew:
  10.  
  11. REAL argument is unset
  12. ############################################################################################
  13. --------------------------------------------------------------------------------------------
  14. called from - gml_Script_state_hoplite_attack (line 2)
  15. called from - gml_Script_state_execute (line 3)
  16. called from - gml_Object_obj_hopliteNew_Step_0 (line 6)
  17.  
  18.  
  19. Script:
  20.  
  21. var np = instance_nearest(x,y,par_player);
  22. var atFire = 0;
  23. if adjacentfire != noone{
  24. np = instance_nearest(x,y,par_fire);
  25. atFire = 1;
  26. } else if place_meeting(x,y,par_thingy){
  27. np = instance_nearest(x,y,par_thingy);
  28. atFire = 1;
  29. }
  30. if instance_exists(np) and np != noone{
  31. direction = point_direction(x,y,np.x,np.y);
  32. }
  33. if state_new {
  34. /* if hasCast == 0{
  35. state_switch("Casting");
  36. }*/
  37. with obj_hopliteNew{
  38. if phalanxID == phalanxID and state_name != "Dying" and state_name != "Attack"
  39. and state_name != "Hit Stun" and state_name != "Clashed"{
  40. state_switch("Attack");
  41. }
  42. }
  43. state_var[0] = 0;
  44. sprite_index = weaponCastBSpriteR;
  45. image_index = 0;
  46. sword = noone;
  47. flee = 0;// if atfire == 1 { flee = 1; }
  48. // motion_add(direction+(180*atFire),15);
  49. state_var[1] = 0; // HAS SWORD ATTACKED?
  50. if facing > 90 and facing <= 270 {
  51. image_xscale =-1;
  52. } else {
  53. image_xscale = 1;
  54. }
  55. // motion_add(direction+(180*atFire),15);
  56.  
  57. }
  58. //state_switch("Wander"); //turns off weapon]
  59. //current_pal = 2;
  60.  
  61. //state_switch("Wander"); //turns off weapon]
  62. //current_pal = 2;
  63. if speed > 10/*10*/ and dashTimer < 0 and -dashTimer mod 2 == 1{
  64. var particle = instance_create(x,y, obj_playerDashParticle);
  65. particle.starting_pal = 9;
  66. particle.current_pal = 9;
  67. particle.sprite_index = sprite_index;
  68. particle.image_index = image_index;
  69. particle.image_xscale = 1;
  70. particle.image_yscale = 1;
  71. particle.flash_timer = 100;
  72. particle.depth = depth + 8;
  73. }
  74. if image_index < 3 and atFire == 0{
  75. image_speed = .14;//.17; goes with 12 delay
  76. } else {
  77. image_speed = .2;
  78. }
  79. state_var[0] += 1;
  80.  
  81. if sword == noone {
  82. if state_var[0] >= mainHandDelay and state_var[1] == 0{//control_repository.heavySoulStartUpArray[mainHand] - 4{
  83. //scr_NPCMainHand();
  84. scr_hopliteWeap();
  85. state_var[1] = 1;
  86. } }
  87. else if state_var[1] == 1
  88. and !instance_exists(sword) {
  89. speed = 0;
  90. state_switch("Wait");
  91. }
  92. if phalanxLead == id{ // issue orders
  93. formLead = noone;//id;
  94. scr_phalanx(phalanxType);//choose(1,2,3));
  95. } else if phalanxLead == noone and phalanxID != -1{
  96. formLead = phalanxID;
  97. }
  98. if instance_exists(formLead) and formLead != noone {// and formLead != self.id
  99. //los = scr_gridCollisionLine(x,y,formLead.x,formLead.y,HARDWALL);
  100. if formationX > 0 or formationY > 0{//and los == false {
  101. scr_steering_phalanx();// scr_steering_formation();
  102. } else {
  103. scr_steering_phalanx();//scr_steering_formation();// scr_steering_skirmisher();//scr_steering_wander();
  104. }
  105. } else {
  106. //scr_steering_skirmisher();//scr_steering_wander();
  107. //leader doesnt move
  108. scr_steering_hoplite();
  109. } // }
  110. if flashCounter > 0
  111. {
  112. state_switch("Hit Stun");
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement