Only if Colliding
#1
Posted 07 May 2012 - 12:57 PM
Thanks for the help
#2
Posted 07 May 2012 - 01:34 PM
but your better off using if(!place_meeting(x,y,obj_wall)){variable=0;}
i think that should do what you want
#3
Posted 07 May 2012 - 01:51 PM
Do i throw the code in the step event? I'm trying to use it, but the variable doesn't change back to 0 when it changes to 1.either use one of the collision functions(circle, rectangle...) or use place_free, place_empty
but your better off using if(!place_meeting(x,y,obj_wall)){variable=0;}
i think that should do what you want
#4
Posted 07 May 2012 - 01:56 PM
If i touch a wall -> set variable to x. If not -> set variable to y.
The step event makes it check if it touches a wall every time the game takes a "step" (default is 30 pr. second)
Edited by element_boy6522, 07 May 2012 - 01:57 PM.
#5
Posted 07 May 2012 - 01:59 PM
Thanks for the help, it works now. I realized i needed an else command to fix the problem.yeah, you would put it in step. You basically want it to say:
If i touch a wall -> set variable to x. If not -> set variable to y.
The step event makes it check if it touches a wall every time the game takes a "step" (default is 30 pr. second)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











