| XtrackterX |
Posted: 13-04-10' (2 years ago)
Post #0001
|
|
-Stats- Profession: Programmer Level: 1 Posts: 6 (50% Spam) XP: 6 |
Hello I am making a game, in this game i have a object that needs to be able to move automated, routed. I have never heard of doing this, does anyone have a tutorial?
like making him move in a simple pattern as a slant or anything. | |
| supperbas |
Posted: 13-04-10' (2 years ago)
Post #0002
|
|
-Stats- Profession: Programmer Level: 5 Posts: 449 (1% Spam) XP: 1069 Founder V1 Member V2 Member |
You can move the object like this
speed=5; object._x+=speed; object._y+=speed; This will make the object go diagonal, basically what you do is you change the _x and _y position for that object so. _x for the horizontal axis and _y for the vertical axis. If you want to have a pattern you could write a function, formula or probably even a matrix. if you want a slant you could probably do something like this slope=1.5; xSpeed=1; object._x+=xSpeed; object._y+=slope; Note: object._x+=value; is the same as object._x = object._x + value; Is this kind of what you mean? otherwise try to give us some more info so we can help you =] -------------------- SupperBas[dot]Com - site of power - | |
| XtrackterX |
Posted: 28-05-10' (2 years ago)
Post #0003
|
|
-Stats- Profession: Programmer Level: 1 Posts: 6 (50% Spam) XP: 6 |
That is a little bit what i wanted.
I am trying to develop a american football game and I need a circle to run a route. like this |--------- | | O He will run up then turn to the right. if this makes any sense. | |