Constraining an Invisible actor to the body of another actor
I have 2 humanoid actors (in terms of the art) holding knives in a stabbing position in front of them. The behaviour is to move back a little when they touch each iother while subtracting a value from their 'HP'. But its absurd-looking because the area where they meet is the knife, so they move back and later die without even touching each other's body, just the tip of the knife touching briefly. I have an idea to fix it : Make an invisible actor with the same behaviour (removing the behaviurs from the first actors) and constraining it to the body of the humanoids.
1.How??
2.Is there an easier/ better way?
Thanks
1.How??
2.Is there an easier/ better way?
Thanks
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Comments
Make two global (game) attributes MrStabberMan X and MrStabberMan Y.
Place two rules in the invisible actor:
Constrain MrStabberMan X to self.position X
Constrain MrStabberMan Y to self.position y
Then place two rules in the larger actor with the image:
Constrain self.position X to MrStabberMan X
Constrain self.position Y to MrStabberMan Y
Now the larger actor with the image will track the smaller invisible actor.
Imagine this:
"I've just done a complex calculation and was expecting the result to be 147.8 but instead I just get 89.337 . . . hope someone can fix this for me, I'll check in for your answers tomorrow".
Now imagine how much easier it would be if this person simply supplied the actual calculation and not just a description of the error it produced.