Bullet shooting the wrong direction

Hi,

I am making my enemies shoot against my player and the bullet is firing in the wrong direction. I have used the code below:

go.animate(".", “position.y”, go.PLAYBACK_ONCE_FORWARD, 1700, go.EASING_LINEAR,1)

I have tried changing the playback to backward but the bullet goes towards the enemy rather than down the screen.

does anyone have any ideas?

What is the current position when you start the animation (ie what is the value of position.y)?

Remember that it is the bottom left corner which is 0,0 and as you move up the screen the y-value increases. Since you animate position.y to the value of 1700 it is probably likely that the bullet is travelling up the screen, not down?

The value of y is 942 and its shoots up the screen, I need it to shoot downwards from a starting position where my enemy is which is x: 751 and y: 942.

This is a screen shot of my bullet going towards the top of the screen rather than at the player ship.

like britzl said, if you want to shoot downwards you need to go negative, so your target position.y should be lower than your starting position.y

go.animate(".", “position.y”, go.PLAYBACK_ONCE_FORWARD, 0, go.EASING_LINEAR,1)

thats perfect, I didn’t even think of that. Really appreciate it.