Advertisement
Guest User

instance_exists failure

a guest
Sep 23rd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (array_length_1d(projectiles) > 0) {
  2.     for (var i = 0; i < array_length_1d(projectiles); i++) {
  3.         if (projectiles[i] != noone)) {
  4.             if (projectiles[i][? "length"] > 0
  5.                 && instance_exists(projectiles[i][? "id"]) ) {
  6.                    
  7.                 projectiles[i][? "length"] -= 1;
  8.  
  9.                 var total_life = variable_instance_get(projectiles[i][? "id"], "length");
  10.                 variable_instance_set(projectiles[i][? "id"], "hsp",
  11.                     ease_cubeIn(
  12.                         0,
  13.                         floor(10 * projectiles[i][? "ratiox"]),
  14.                         total_life - projectiles[i][? "length"],
  15.                         total_life
  16.                     )
  17.                 )
  18.             } else {
  19.                 ds_map_destroy(projectiles[i]);
  20.                 projectiles[i] = noone;
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement