• 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!

Test the position and collision of an object

R

Raydenn

Guest
Hi, i'm making my first game and i want to change the speed vertical of an object if he touch another object and at an y position.
I know it's probably easy to do but i don't know how to do it, and also sorry for my bad english i'm not english.
I hope you can help me.
 
A

Aura

Guest
A diagram might help you with illustrating what you want.
 
A

Aura

Guest
Use the ! (not) operator along with a collision detection function.

Code:
if (!place_meeting(x, y, obj_Bud)) {
   // Do something...
}
 
Top