Im doing a sword game where the sword point towards the mouse.
How do i make it so i hurt the enemy only when slashing the sword?
And How to make it hurts more if i slash it faster?
Last edited by keroro645 (2008-09-20 12:31:40)
Offline
veriables. Make a verible change another verible or in this case the rate that the sword is moving/rotating at as one verible * the damage verible with other formulas to make it realistic. in my opinion a good example is my drag racers game, the rate of accaleration uses a combination of the engines rpm, the gears and some other stuff that i forgot. Hope that helpd
Offline
I made a little project for you to use. It's an extremely simple script. Just set it so if the enemy is touching the sword their health is reduced by the slash power.
CLICK!
Offline
keroro645 wrote:
I dont understand.
I mean how do i make it so that it tells how fast it rotating?
add this script to the sword
<when green flag clicked>
<forever>
<set{ old rotation }to( <direction>
<wait( 0.01 )secsc>
<set{ power }to( <abs( (( <direction> <-> <{ old direction }> ))
<end>
hope that helps
Offline