Advertisement
Munomario777

easily convert old rune code to new!

Jul 20th, 2020
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. //init.gml
  2.  
  3. //Sets the variables runeA, runeB, etc according to whether or not that rune was selected
  4.  
  5. var rune_letters = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O"];
  6.  
  7. for (var rune_num = 0; rune_num < array_length(rune_letters); rune_num++){
  8. variable_instance_set(self, "rune" + rune_letters[rune_num], has_rune(rune_letters[rune_num]));
  9. }
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17. //Old version, does the same thing but longer
  18.  
  19. runeA = has_rune("A");
  20. runeB = has_rune("B");
  21. runeC = has_rune("C");
  22. runeD = has_rune("D");
  23. runeE = has_rune("E");
  24. runeF = has_rune("F");
  25. runeG = has_rune("G");
  26. runeH = has_rune("H");
  27. runeI = has_rune("I");
  28. runeJ = has_rune("J");
  29. runeK = has_rune("K");
  30. runeL = has_rune("L");
  31. runeM = has_rune("M");
  32. runeN = has_rune("N");
  33. runeO = has_rune("O");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement