I have a kinda short one that doesnt work well. Speed of "X" > 0 + Every 00"-01 set Y position of "X" to Y position of "X" + (higer number if you want higher pull)
But if you use the Speed of "X" > 0 thing, It will stop in mid air, but if you dont use it, the object will just go through platforms and stuff
I never bother trying to get too much accuracy, I've always just had an Add 1 to Y position, or sometimes had an alterable value that increases, and had that value add to the Y position. In basic platformers, you don't really need anything else unless you're pedantic about mathematical accuracy.
yeah but what if you want shit to bounce or roll down a hill.
Steve Zissou: Anne-Marie, do all the interns get Glocks?
Anne-Marie: No, they have to share one.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
14th July, 2005 at 02:32:33 -
If you want 'shit' to bounce or roll then you just add gravity the way people usually do:
Active is not overlapping a backdrop > Add one to Alt A of Active
Always > set Active's Y position to Active's Y position + Alt A of Active.
Then for bouncing you just subtract a substantial amount from Alt A, after setting it to zero when it collides with the ground. You will most likely encounter 'graphics glitches' when your active collides with the ground. This can be fixed with a small fast loop (Run it for as many pixels as the active is in height) which moves the active object up one pixel on each loop.
Active is overlapping a backdrop > Alt a = -16, Run loop "fix" for 32 loops,
On loop 'fix' >
+Active is overlapping a backdrop > Active's Y = Active's Y - 1
on loop 'fix'
+ Active is not overlapping a backdrop > Stop loop 'fix'
By the way, It says somewhere that the Grav Object is made for KNP. Which is confusing because KNP can't use extensions.
Well there isn't a "Grav" object to my knowledge. And when i write 'Klik and play gravity object' i mean an object for The games factory only called that.
andy, that doesn't do what I want, for example if you drop a ball down a slope, i want it to roll bounce a bit at first, getting less height each time, to where it just rolls. then at the bottom the ground goes up again, the ball will roll up as far as it's momentum will take it, then roll back down.
Steve Zissou: Anne-Marie, do all the interns get Glocks?
It's kinda buggy and terribly commented, but it supports bouncing off walls and platforms for multible objects. Maybe it can give you some ideas to make an engine of your own like it.
Working On:
Psydude
Castle Wars(working title)
XBLGT: sunstrike9
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
15th July, 2005 at 07:37:22 -
My example was just a base that I thought you might be able to expand on