• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

place_meeting not working???

I

Ieyfo

Guest
OK place meeting isn't working.
In the code below if its metting at any give point i want it to write to the file and its not when i habe it write when its not meeting it writes fine.

Code:
var file;
file = file_text_open_write(working_directory + "\tree.txt");
if(place_meeting(0,0, obj_wood_oak)){
    file_text_write_string(file, "instance_create(-80,160,obj_wood_oak)");
}
file_text_close(file);
Don't know if it matters but all objects are move_snap(16,16); and there origin is 0,0 on the sprite.

I've tried other areas to see if it was that one spot, I have filled it all up and its not writing when it should.
 
J

jr carey

Guest
what are you trying to do? if your trying to get X and Y coordinates from a file try using INI files instead of text files
 
A

Aura

Guest
The place_meeting() function requires both the instances to have valid collision masks. In case the instance calling this code doesn't have a collision mask, place_meeting() won't return true and you would have to use position_meeting() instead.
 
I

Ieyfo

Guest
The place_meeting() function requires both the instances to have valid collision masks. In case the instance calling this code doesn't have a collision mask, place_meeting() won't return true and you would have to use position_meeting() instead.
Thank you wasn't aware of the specifications .
 
Top