Ive been working on a game where instead of "moving" your character is in a set position as he just scrolls (creates the affect of moving)
I have enemies also, but i cannot figure out a way to create a smooth move for them. I have them switching costumes but that creates jerky and not very pleasant motions.
Ive tried using X and Y coordinates but that wont work because the enemy wont stay where he is in the enviroment based on scrolling and its weird.
Also giving him his own scroll variables will not move him so any suggestions?
Offline
Give him his own offset. Let the scroll variable control him with his offset also controlling him. It's hard to explain...would you like an example or is this enough information to help you?
Offline
AtomicBawm3 wrote:
Give him his own offset. Let the scroll variable control him with his offset also controlling him. It's hard to explain...would you like an example or is this enough information to help you?
I'm not extremely great with terminology so ill need to know what offsetting is sorry if this is inconvenient to you. I'm newish. ._.
Offline
FlipyKid wrote:
AtomicBawm3 wrote:
Give him his own offset. Let the scroll variable control him with his offset also controlling him. It's hard to explain...would you like an example or is this enough information to help you?
I'm not extremely great with terminology so ill need to know what offsetting is sorry if this is inconvenient to you. I'm newish. ._.
Ok, so basically you have a scrolling x value, correct? This is the x position of the character but because of the way we're displaying the game, the x position of the character is 0. This means the character's offset is the scrolling x value *-1. If we were to change that to a constant, say 50, the character would eventually move off the screen because the offset is not keeping it on the screen like when we have it set to negative the scroll value. For enemies, we can have the offset be between two numbers, say 100 and 200. We might use two scripts like this:
when gf clicked forever go to x:((scrollx)+(offset)) y:(0)
when gf clicked set [offset v] to (100) forever repeat (100) change [offset v] by (1) end repeat (100) change [offset v] by (-1) endThis is a very simple example and the two scripts could be combined, but this shows the basic idea.
Offline