Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(barva == c_green){
- barva = c_red;
- ini_open("test.sav");
- ini_write_real("test", string(poradi), 1);
- ini_write_real("test", string(poradi)+"-x", x);
- ini_write_real("test", string(poradi)+"-y", y);
- for(var i = -1; i <= 1; i+=2){
- xx = 0; yy = 0;
- if(ini_key_exists("test", string(poradi+i)) && xx == 0 && yy == 0){
- xx = ini_read_real("test", string(poradi+i)+"-x", -1);
- yy = ini_read_real("test", string(poradi+i)+"-y", -1);
- }
- if(xx != 0 && yy != 0){
- x2 = abs(x - xx) / 32;
- y2 = abs(y - yy) / 32;
- vzdalenostX = 0;
- for(s = 0; s <= x2; s++){
- if(x < xx){
- show_debug_message("if");
- if!(position_meeting(x + vzdalenostX, y, obj_pipe)){
- instance_create(x + vzdalenostX, y, obj_pipe);
- }
- if(s == x2 && y2 != 0){
- vzdalenostY = 0;
- for(ss = 0; ss <= y2; ss++){
- if(y < yy){
- if!(position_meeting(x + vzdalenostX, y + vzdalenostY, obj_pipe)){
- instance_create(x + vzdalenostX, y + vzdalenostY, obj_pipe);
- }
- } else {
- if!(position_meeting(x + vzdalenostX, y - vzdalenostY, obj_pipe)){
- instance_create(x + vzdalenostX, y - vzdalenostY, obj_pipe)
- }
- }
- vzdalenostY += 32;
- }
- }
- } else {
- show_debug_message("else");
- if!(position_meeting(x - vzdalenostX, y, obj_pipe)){
- instance_create(x - vzdalenostX, y, obj_pipe);
- }
- if(s == x2 && y2 != 0){
- vzdalenostY = 0;
- for(ss = 0; ss <= y2; ss++){
- if(y < yy){
- if!(position_meeting(x - vzdalenostX, y + vzdalenostY, obj_pipe)){
- instance_create(x - vzdalenostX, y + vzdalenostY, obj_pipe);
- }
- } else {
- if!(position_meeting(x - vzdalenostX, y - vzdalenostY, obj_pipe)){
- instance_create(x - vzdalenostX, y - vzdalenostY, obj_pipe);
- }
- }
- vzdalenostY += 32;
- }
- }
- }
- vzdalenostX += 32;
- }
- }
- }
- ini_close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement