Jump to content


Photo

Game Maker Collision


  • Please log in to reply
10 replies to this topic

#1 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 03:58 AM

i understand that game maker has its own collision actions when you put ANYTHING in the collision event...
is there a way to disable that?

as in i need the other. variable. and the object, i want to walk through it when its solid...

Edited by flxp, 06 January 2012 - 03:59 AM.

  • 0

#2 DudeGuy676

DudeGuy676

    GMC Member

  • New Member
  • 47 posts
  • Version:GM:Studio

Posted 06 January 2012 - 04:02 AM

as in i need the other. variable. and the object, i want to walk through it when its solid...


Could you please rephrase this sentence? I find it hard to understand.
  • 0

#3 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 04:17 AM


as in i need the other. variable. and the object, i want to walk through it when its solid...


Could you please rephrase this sentence? I find it hard to understand.

sorry,
in the collision event the variable other, is the other object you are colliding with.
and i want this other object im colliding with to be solid, but not have game maker's collisioning to come in place.

Edited by flxp, 06 January 2012 - 04:17 AM.

  • 0

#4 DudeGuy676

DudeGuy676

    GMC Member

  • New Member
  • 47 posts
  • Version:GM:Studio

Posted 06 January 2012 - 04:21 AM

then just don't add a collision event in that object. If that doesn't help, I'm going to need you to be more specific. Post the code that your using.
  • 0

#5 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 04:26 AM

the thing is, the collisioning that game maker implies when you put in anything into a collision event, while the other object is solid, interferes anyways...
i just simply want to know if i can bypass that automatic action?
  • 0

#6 DudeGuy676

DudeGuy676

    GMC Member

  • New Member
  • 47 posts
  • Version:GM:Studio

Posted 06 January 2012 - 04:31 AM

Which automatic action do you want to bypass?
  • 0

#7 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 04:39 AM

well Game maker automatically adds collision to a solid object if you put any D&D in the collision code
  • 0

#8 torigara

torigara

    GMC Member

  • GMC Member
  • 6507 posts

Posted 06 January 2012 - 04:50 AM

as in i need the other. variable. and the object, i want to walk through it when its solid...

Then turn it non-solid. The whole point of making an object solid is to keep you from walking through.

That said, if you want an id of instance at a particular place, there is no need to rely on collision events but use one of collision functions: instance_place, instance_position, collision_rectangle and so on.
  • 0

#9 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 04:59 AM

so how do i find other.'s variables outside of the collision event?

other=place_meeting(x+16,y,Bound)??
  • 0

#10 torigara

torigara

    GMC Member

  • GMC Member
  • 6507 posts

Posted 06 January 2012 - 05:41 AM

place_meeting only returns true or false. Use other function that returns an instance id I have mentioned in earlier post. And you can't assign a value to the in-built constant other. Use your own variable instead.
inst = instance_place(x+16, y, Bound);
// Now use "inst" in place of "other"

  • 1

#11 flxp

flxp

    GMC Member

  • GMC Member
  • 325 posts
  • Version:GM8

Posted 06 January 2012 - 05:43 AM

this opens up alot more to game maker
thanks

Edited by flxp, 06 January 2012 - 08:00 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users