I'm making a scroller, and I need someone to program me a tutorial for scrolling enemies. The enemies pop up randomly, and that's what I need help with. The also move on their own closer to you. Please help! (Sorry about the discription, I know it's not very good. If you have an questions, please do ask.)
Offline
Let's see, here's what you do:
First you make a new variable for the enemy called "Xpos". Now set up these scripts:
This will make him align to the scrolling, and move side to side. Of course, change the first block of the first script to increase/decrease the area it will appear in, and change the second script to match the motion type you want.
Last edited by Kileymeister (2010-02-10 21:27:47)
Offline
Don't make the variable called 'xpos'. I'm sure you know it does nothing. Make it something you'll remember, like Enemy Location. It's not like you'll need a Y position for the enemy unless the map goes down when you jump. (The 2 different ways of jumping you could make are: the character you control is dynamic and jumps only, or the character stays static and the backgrounds and enemies move)
Also about the random -500 to 500 thing: That would make it possible for an enemy to be right beside you or on top of you when you start the game. If you use the 'and' boolean, you can make the first part of the map a safe zone.
Last edited by Ace-of-Spades (2010-02-11 07:36:33)
Offline
Ace-of-Spades wrote:
Don't make the variable called 'xpos'. I'm sure you know it does nothing. Make it something you'll remember, like Enemy Location. It's not like you'll need a Y position for the enemy unless the map goes down when you jump. (The 2 different ways of jumping you could make are: the character you control is dynamic and jumps only, or the character stays static and the backgrounds and enemies move)
Also about the random -500 to 500 thing: That would make it possible for an enemy to be right beside you or on top of you when you start the game. If you use the 'and' boolean, you can make the first part of the map a safe zone.
What do you mean you're sure that I know it does nothing?
People remember that.
Offline