So when i move backwards- the bomb moves at the slowest speed. When i move forwards- i shoot slightly faster than ships velocity?
...I know i've been posting alot for help but i started only a couple of weeks ago and i've have been tryin to do things myself but failing
Offline
forever if <key [up arrow v] pressed?> change [velocity v] by (2) end if <key [down arrow v] pressed?> change [velocity v] by (-2) end set [velocity v] to ((velocity) * (0.86)) move (velocity) steps set [bomb speed v] to ((([abs v] of (velocity)) * (1.1)) + (velocity)) if <key [space bar v] pressed?> broadcast [bomb v] endSomething like that? The bomb speed formular should work for what you want, adjust the (1.1) value if you want it to go faster or slower.
Offline
Ty i'll try this when i get a moment but one question- once i've fired the bomb and its moving if i press up or down- does that bomb change speed or does it remain traveling at the same speed?
Offline
At the moment, it would change the speed. (You'll also need a way to turn the ship sprite). You should add this to the bomb sprite:
when i receive [bomb v] point in direction ([direction v] of [ship v]) go to [ship v] set [lock speed v] to (bomb speed) show repeat until <touching [edge v]?> move (lock speed) steps end hide
Last edited by Prestige (2012-08-03 07:11:51)
Offline