Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error Message:
- ___________________________________________
- ############################################################################################
- FATAL ERROR in
- action number 1
- of Step Event0
- for object obj_hopliteNew:
- REAL argument is unset
- ############################################################################################
- --------------------------------------------------------------------------------------------
- called from - gml_Script_state_hoplite_attack (line 2)
- called from - gml_Script_state_execute (line 3)
- called from - gml_Object_obj_hopliteNew_Step_0 (line 6)
- Script:
- var np = instance_nearest(x,y,par_player);
- var atFire = 0;
- if adjacentfire != noone{
- np = instance_nearest(x,y,par_fire);
- atFire = 1;
- } else if place_meeting(x,y,par_thingy){
- np = instance_nearest(x,y,par_thingy);
- atFire = 1;
- }
- if instance_exists(np) and np != noone{
- direction = point_direction(x,y,np.x,np.y);
- }
- if state_new {
- /* if hasCast == 0{
- state_switch("Casting");
- }*/
- with obj_hopliteNew{
- if phalanxID == phalanxID and state_name != "Dying" and state_name != "Attack"
- and state_name != "Hit Stun" and state_name != "Clashed"{
- state_switch("Attack");
- }
- }
- state_var[0] = 0;
- sprite_index = weaponCastBSpriteR;
- image_index = 0;
- sword = noone;
- flee = 0;// if atfire == 1 { flee = 1; }
- // motion_add(direction+(180*atFire),15);
- state_var[1] = 0; // HAS SWORD ATTACKED?
- if facing > 90 and facing <= 270 {
- image_xscale =-1;
- } else {
- image_xscale = 1;
- }
- // motion_add(direction+(180*atFire),15);
- }
- //state_switch("Wander"); //turns off weapon]
- //current_pal = 2;
- //state_switch("Wander"); //turns off weapon]
- //current_pal = 2;
- if speed > 10/*10*/ and dashTimer < 0 and -dashTimer mod 2 == 1{
- var particle = instance_create(x,y, obj_playerDashParticle);
- particle.starting_pal = 9;
- particle.current_pal = 9;
- particle.sprite_index = sprite_index;
- particle.image_index = image_index;
- particle.image_xscale = 1;
- particle.image_yscale = 1;
- particle.flash_timer = 100;
- particle.depth = depth + 8;
- }
- if image_index < 3 and atFire == 0{
- image_speed = .14;//.17; goes with 12 delay
- } else {
- image_speed = .2;
- }
- state_var[0] += 1;
- if sword == noone {
- if state_var[0] >= mainHandDelay and state_var[1] == 0{//control_repository.heavySoulStartUpArray[mainHand] - 4{
- //scr_NPCMainHand();
- scr_hopliteWeap();
- state_var[1] = 1;
- } }
- else if state_var[1] == 1
- and !instance_exists(sword) {
- speed = 0;
- state_switch("Wait");
- }
- if phalanxLead == id{ // issue orders
- formLead = noone;//id;
- scr_phalanx(phalanxType);//choose(1,2,3));
- } else if phalanxLead == noone and phalanxID != -1{
- formLead = phalanxID;
- }
- if instance_exists(formLead) and formLead != noone {// and formLead != self.id
- //los = scr_gridCollisionLine(x,y,formLead.x,formLead.y,HARDWALL);
- if formationX > 0 or formationY > 0{//and los == false {
- scr_steering_phalanx();// scr_steering_formation();
- } else {
- scr_steering_phalanx();//scr_steering_formation();// scr_steering_skirmisher();//scr_steering_wander();
- }
- } else {
- //scr_steering_skirmisher();//scr_steering_wander();
- //leader doesnt move
- scr_steering_hoplite();
- } // }
- if flashCounter > 0
- {
- state_switch("Hit Stun");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement