What is this funtion that I'm thinking of?
#1
Posted 03 June 2012 - 06:32 PM
For example lets say we have player object and another object, how do we figure out in code if the player's Y position is lower then the other objects?
I hope that makes sense.
#2
Posted 03 June 2012 - 06:36 PM
if player.y < obj_other.y
{
do whatever
}
#3
Posted 03 June 2012 - 06:37 PM
can't you use:What is the one where you can determine weither an object is x or y different for another.
For example lets say we have player object and another object, how do we figure out in code if the player's Y position is lower then the other objects?
I hope that makes sense.
if (obj_first.x <= obj_second.x or obj_first.x >= obj_second.x)
{
//do this
}
if (obj_first.y <= obj_second.y or obj_first.y >= obj_second.y)
{
do this
}seems simple but no I have no idea sorry. Edited by creators124, 03 June 2012 - 06:38 PM.
#4
Posted 03 June 2012 - 06:49 PM
Or were you talking about distance_to_point?
#5
Posted 03 June 2012 - 07:00 PM
#6
Posted 03 June 2012 - 07:38 PM
as far as i can see
!place_meeting(x,y,obj_other)
or
if !x=obj_other.x and !y=obj_other.y
{
}
is about all i can come up with to help you out
Edited by kelson, 03 June 2012 - 07:41 PM.
#7
Posted 03 June 2012 - 07:46 PM
if ((y) > (another_object.y))
{
//do something
}
//if y is larger than another_object's y position
//the perform events
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











