Distance from Attribute using constrain to a specific location
kirkland
Removed Posts: 268
hey guys.
This is different to what i have said in the past. what i am wanting to know is how can i constrain an actor to another using the
constrain attribute self.distancefrom to ( self.Position.X - game.HeroX )( self.Position.Y - game.HeroY )
how do i constrain an actor to an specific location using that code with actor i want to constrain. i have used minus and plus like tsirtbooth has said in his tutorials. any ideas guys please comment below
This is different to what i have said in the past. what i am wanting to know is how can i constrain an actor to another using the
constrain attribute self.distancefrom to ( self.Position.X - game.HeroX )( self.Position.Y - game.HeroY )
how do i constrain an actor to an specific location using that code with actor i want to constrain. i have used minus and plus like tsirtbooth has said in his tutorials. any ideas guys please comment below
Comments
it probably isn't hard to you, yes it is a little tricky for me but that is why i am asking. please can you tell me where to look in the demo then please. to sort this problem out. please
please help me guys
i will tell you what, if you tell me how to do it and it is the right thing for me and i don't understand it then i will not comment on this thread again.
is that a deal
which bit do you want me to look at tshirtbooth
i am looking at this template i am in the wall codes right now i am looking at them which bit in the bottom to codes should i be changing please.
thank you again
i have checked it out however i still do not know what i need to change. please can you give me some more hints. thank you again for this help
If you are trying to put a bar on top of a triangle. Just give the grey actor a triangle image. Then delete three of the walls (but leave the one on the top). Then give the top "wall" a bar image.
Does that help?
there is a screenshot of what is going on
http://imageshack.us/photo/my-images/715/unledkbv.png/
please let me know how i can change the location of the blue bar with the codes in the text editor please. thank you
You're welcome... and I'll be expecting my check in the mail
I will remind you that I gave you a perfectly workable solution to your needs several weeks ago. I repeat -- if you have an object that is permanently welded to another, then it should just be made as one object in the first place. (Just make the triangle and bar as one actor.)
Hopefully in just a few more weeks GameSalad will have joints. However, I fear that the way GameSalad implement joints will interfere with physics. (Just like constrains interfere with physics.)
That, by the way, is part of the problem I am currently having when making joints in GameSalad. The joints I currently make are not compatible with the physics engine. They fight each other.
and tshirtbooth.
and i know that tshirtbooth knows JohnPapiomitis. please can you help i am not that great at maths guys
You already did this. I recall that the ball bounced kind of funny, but that was because you still needed to work on the physics (density and restitution).
i am wanting to do different shapes as well that is why i need have code that works