So i'm making Spice Pirate right? I need some help, so, here goes.
It's an x and y scroller, but i need these things 'freighters' to move from one planet top another, while you are just moving around anywhere you want.
MORE IN DEPTH: So you can move around anywhere you want, shoot any ships you want, but meanwhile there is a gamewide trading system, with freighters going from one planet to another. I have thought of a way, but no. I thought that i could just make the freighters point towards (planet) and move there, but as you scroll, the planets move too, so this won't work. Any ideas??? I really want this to go ahead.
Offline
So you need the freighters to move towards the planets, but stay relative to your own scrolling position? There's an easy way. Simply assign the freighters new variables called "ScrollXPosition" and "ScrollYPosition" and add a script like this:
http://img39.imageshack.us/img39/6850/script.gif
Now, instead of changing their X and Y positions, change their ScrollXPosition and and ScrollYPosition variables instead. So if you wanted it to go to planets, you can do something like this:
http://img542.imageshack.us/img542/6850/script.gif
This serves as the equivalent of "point and move three steps" but in variable form.
So now in the end the freighters behave as though there is no scrolling at all, their true position is concrete, and you see where they would be relative to your own position.
If you need any other help let me know.
Also, I am loving this Help With Scripts section. Very clear cut and to the point.
Last edited by Kileymeister (2012-01-26 18:33:55)
Offline
Kileymeister wrote:
So you need the freighters to move towards the planets, but stay relative to your own scrolling position? There's an easy way. Simply assign the freighters new variables called "ScrollXPosition" and "ScrollYPosition" and add a script like this:
http://img39.imageshack.us/img39/6850/script.gif
Now, instead of changing their X and Y positions, change their ScrollXPosition and and ScrollYPosition variables instead. So if you wanted it to go to planets, you can do something like this:
http://img542.imageshack.us/img542/6850/script.gif
This serves as the equivalent of "point and move three steps" but in variable form.
So now in the end the freighters behave as though there is no scrolling at all, their true position is concrete, and you see where they would be relative to your own position.
If you need any other help let me know.
Also, I am loving this Help With Scripts section. Very clear cut and to the point.
wow, thanks!!! yeah, this section is definately going to be great.
Offline