Hello, my name is Hydreigon and I have been working on a very long and tiring project. It is a scrolling platformer game called Steve in Space. I have got to a point in which I wish to make bullets move, however stick with the scrolling sequence in the game. In the past I had made something like this called postitionx and positiony, however the old game got corrupted.
Thanks in advance.
Offline
So what do you want help with?
Offline
I recently created a script that did exactly this (to an extent)
basically just have the bullet move the opposite direction you would when you press wasd or the arrow keys(whatever you use to move)
Offline
First of all you should pretend the bullet is part of the scenery -- so that the scripts that control its movement are exactly the same as those in one of your terrain.
Of course this will make the bullet stick to the scenery. Therefore you must make two new variables "for this sprite only" called xposition and yposition. You need to then modify the original movement script and add xposition to the X scroll and yposition to the Y scroll of that particular sprite.
Now you can control the position of the bullet using xposition and yposition as if they were the real (x position) and (y position) blocks, but the bullet will move relatively to the scenery
If that didn't make sense, I'll try to re-explain.
Offline
Thanks guys, but I just came up with a method. The alien that shoots the bullet has a position tracker that will note the aliens position every 0.01 seconds, then fire the bullet using xposition and yposition.
Offline