I have an actor that is moving left and right, i have an actor that jumps on the moving actor, when i jump on the moving actor, the moving actor just falls down .
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 9,934
I have an actor that is moving left and right, i have an actor that jumps on the moving actor, when i jump on the moving actor, the moving actor just falls down .
Create a Self attribute (real) called int.Y The place a change and constrain attribute at the top of the actors behaviors window, Not inside a rule.
Change attribute self.int.Y to self.position.y Constrain attribute self.position.y to self.int.Y
but when i jump from underneath the moving actor, the moving actor shoots to the top, i want it to be static?
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 9,934
Did you put them in a rule? It should not move at all. You could try to replacing the change and constrain with one constrain
Constrain self.motion.linearvelocity.y to 0 If you are putting it in a rule the constrain will only run when the rule conditions are meet. It would be best to keep it outside of a rule
Comments
is this demo on gshelper.com?
I have an actor that is moving left and right, i have an actor that jumps on the moving actor, when i jump on the moving actor, the moving actor just falls down
Change attribute self.int.Y to self.position.y
Constrain attribute self.position.y to self.int.Y
i put the behaviour in the jumping actor, in doing so I am unable to move the actor left and right and also jump,,
when i put the behaviour on the moving actor , the moving actor stops moving?
awesome i can now jump on them,
but when i jump from underneath the moving actor, the moving actor shoots to the top, i want it to be static?
Constrain self.motion.linearvelocity.y to 0 If you are putting it in a rule the constrain will only run when the rule conditions are meet. It would be best to keep it outside of a rule