Jump to content


Photo

Checking from one area to another


  • Please log in to reply
1 reply to this topic

#1 _256605

_256605

    GMC Member

  • New Member
  • 15 posts

Posted 23 May 2012 - 11:04 AM

I wish to create an image/object within a range of x = 0, y = 0 to x = 360, y = 360 if its place is empty.
My image/object size is 36 by 36
Should I use place_free or or place_empty and how should I go about doing it
For example:
if place_free(x + 0, y + 0 to x + 360, y + 360) = true
instance_create(x = mouse_x, y = mouse_y, obj_green)
  • 0

#2 Bending_the_rules

Bending_the_rules

    GMC Member

  • GMC Member
  • 108 posts
  • Version:GM8

Posted 23 May 2012 - 11:25 AM

In normal cases, you may use place_empty; but actually place_meeting gives you better control.
Refer to loops ( "for statement" and "do statement" found under GML language overview) in the help file.
Also, you don't write like "instance_create(x=crap1,y=crap2);" but like this "instance_create(crap1,crap2);"
Last, but not the least, always refer to help file.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users