G
grossik
Guest
Hello
I have script to find object by function instance_position, but the function doesn't find object.
So I create a new script that creates an object and then I want to find the object, but it still doesn't work.
Code:
Output:
576
288
576
288
-4
I have script to find object by function instance_position, but the function doesn't find object.
So I create a new script that creates an object and then I want to find the object, but it still doesn't work.
Code:
Code:
var ss = instance_create(real((real(NPCSouradnice[0]))*32), real((real(NPCSouradnice[1])+1)*32), obj_dedula);
show_debug_message(ss.x);
show_debug_message(ss.y);
var inst = instance_position(real((real(NPCSouradnice[0]))*32), real((real(NPCSouradnice[1])+1)*32), obj_dedula);
show_debug_message(real(NPCSouradnice[0])*32);
show_debug_message((real(NPCSouradnice[1])+1)*32);
show_debug_message(inst);
if(inst != noone) {
show_debug_message(NPCMessage[1]);
inst.text = string(NPCMessage[1]);
}
576
288
576
288
-4