Theres gotta be a way to do it. just cant figure it out.
Comments
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 9,934
As in face to face type face each other?
You could do several rules which determine what image. therefor what direction they are facing and then determine if one is right or left of the other with the correct image to facing the other. WOW I hope that makes sense.
yep you most likely have to do it based on images like tenrdrmer said.
Since you cant actuall flip the actor you can detect which way its facing like that, so depending on which way there facing. So if one has a image looking right on the left of the screen and one on the right of the screen is looking left image, then youll know there facing each outher.
well you can determine what the rotation is when there facing which way. so if one with a rotation of 180 and one with another rotation of 180 are facing each other. Then you can just make global attributes for the 2 then constrain the attributes to there self rotation. So when actor1rotation= 180 and actor 2 rotation= 180 with all conditions valid, you should be able to put your rules in there and will only happen when there facing each other.
all you have to do is make a game attribute real call actor.rotation. then you want to make your actor to perform a vector to angle expression, vectortoangle(self.position.x,self.position.y)-(mouse.position.x,mouse.position.y). i may be wrong with that expression just search it if it doesn't work. then you want to make a constrain actor.rotation to (put vectortoangle formula). now all you have to do is make your actor rotate to the touch position. and perform a rule saying if your actors rotation = actor.rotation atribute : perform what you want
Comments
You could do several rules which determine what image. therefor what direction they are facing and then determine if one is right or left of the other with the correct image to facing the other.
WOW I hope that makes sense.
It sure did I my head when I wrote it
actor one facing down.
touch screen somewhere
actor turns to face that position
i need to know when it sucessfully faces so i can make it do other stuff.
Since you cant actuall flip the actor you can detect which way its facing like that, so depending on which way there facing. So if one has a image looking right on the left of the screen and one on the right of the screen is looking left image, then youll know there facing each outher.
hopefully it helps...