Maybe I can help you...
Ninja
when gf clicked forever wait (0.1) secs wait until <key [space v] pressed?> broadcast [shoot v] and waitDart
when gf clicked hide go to [ninja v]
when i receive [shoot v] show repeat until <<touching [edge v]?> or <touching [enemy v]?>> move [10] steps hide go to [ninja v]Enemy
when gf clicked wait (0.1) secs set [enemy HP v] to (100) forever wait until <touching [dart v]?> change [enemy HP v] by (-1) wait (0.1) secs
Last edited by BLU_Spy (2013-01-09 17:41:18)
Offline
BLU_Spy wrote:
Maybe I can help you...
Ninjawhen gf clicked forever wait (0.1) secs wait until <key [space v] pressed?> broadcast [shoot v] and waitDartwhen gf clicked hide go to [ninja v]when i receive [shoot v] show repeat until <<touching [edge v]?> or <touching [enemy v]?>> move (10) steps hide go to [ninja v] endEnemywhen gf clicked wait (0.1) secs set [enemy HP v] to (100) forever wait until <touching [dart v]?> change [enemy HP v] by (-1) wait (0.1) secs
Fixed a few parts.
Offline
ErnieParke wrote:
BLU_Spy wrote:
Maybe I can help you...
Ninjawhen gf clicked forever wait (0.1) secs wait until <key [space v] pressed?> broadcast [shoot v] and waitDartwhen gf clicked hide go to [ninja v]when i receive [shoot v] show repeat until <<touching [edge v]?> or <touching [enemy v]?>> move (10) steps hide go to [ninja v] endEnemywhen gf clicked wait (0.1) secs set [enemy HP v] to (100) forever wait until <touching [dart v]?> change [enemy HP v] by (-1) wait (0.1) secsFixed a few parts.
Oh...
Edited original post.Thanks!
Last edited by BLU_Spy (2013-01-09 17:51:08)
Offline
All above is correct, but tell dart to point towards Enemy or it should just straight
Offline
BLU_Spy wrote:
ErnieParke wrote:
BLU_Spy wrote:
Maybe I can help you...
Ninjawhen gf clicked forever wait (0.1) secs wait until <key [space v] pressed?> broadcast [shoot v] and waitDartwhen gf clicked hide go to [ninja v]when i receive [shoot v] show repeat until <<touching [edge v]?> or <touching [enemy v]?>> move (10) steps hide go to [ninja v] endEnemywhen gf clicked wait (0.1) secs set [enemy HP v] to (100) forever wait until <touching [dart v]?> change [enemy HP v] by (-1) wait (0.1) secsFixed a few parts.
Oh...
Edited original post.Thanks!
Your welcome!
Last edited by ErnieParke (2013-01-11 16:47:56)
Offline
....and here's an alternate method, which I believe is a bit more efficient.
[Sorry for the long post]
-------------------------------------------------
When Flag Clicked:
Hide
Repeat until (HP < 0.01)
[
If (Key [Key of your choice] pressed?)
[
Set [Velocity] to 3
Go to [Player]
Point in direction [Direction] of [Player]
Show
Repeat [10]
[
Move [Velocity] Steps
Change [Velocity] by 3
If (Touching [Edge])
[ Hide ] //End of "If touching edge" script.
] //End of repeat loop.
If (Touching [Enemy])
[ Change [Enemy HP] by -1 ] //End of "If touching enemy".
] //End of "If [key] pressed?"
] //End of "Repeat until [HP<0.01]"
-------------------------------------------------
This allows for acceleration. Play with the amount you change Velocity by for a slow or faster acceleration rate, and mess with the amount you set Velocity to at the beginning to change the initial speed. And, finally, changing the number of times the movement is repeated will change the rate of fire, end velocity, and range.
My gripe with the above scripts is first that it requires several scripts, second, the more frequently the dart hits the edge or the enemy increases the firing rate, which I suppose is fine, however, personally, I'd shoot for a more consistent approach. And the final nitpick is there's not acceleration to the bolt, which simply doesn't look quite as nice. However, in principle, what the others have posted is great, and will certainly work.
Happy scratching,
- iNK
Offline