01-06-2006, 10:10 PM
Tutorial for adding in movement (tiredness) for when u move and fight. It lowers SP and then regens.
its upto you how u expand on it (eg. u might not want this for walking). Actual combat effectiveness or whatever with low movement
is upto you to do.
Im using the variable SP for movement which is already set up for SP regenning.
Server Side
in ModGameLogic put this in Sub AttackPlayer AND into Sub AttackNpc
Then (still in ModGameLogic) put this in Sub PlayerMove
I hope this is good enough for a tutorial. Apologies if not. I got some help from dave and anthony - so its not totally all mine. although i did good! and all the extra stuff (i didnt put in here - unless ppl request an expansion) is mine wooooooooot!
Ive also added this into casting spells and added a bar under the sprite for movement (tiredness), and movement affects your combat and spell casting power. if you would like to see this code then let me know and ill gladly post it.
works great woot!
its upto you how u expand on it (eg. u might not want this for walking). Actual combat effectiveness or whatever with low movement
is upto you to do.
Im using the variable SP for movement which is already set up for SP regenning.
Server Side
in ModGameLogic put this in Sub AttackPlayer AND into Sub AttackNpc
Code:
' Drop the SP
If GetPlayerSP(Attacker) > 0 Then
Call SetPlayerSP(Attacker, GetPlayerSP(Attacker) - 1)
Call SendSP(Attacker)
End If
Then (still in ModGameLogic) put this in Sub PlayerMove
Code:
If Moved = YES Then
'reduce SP by 1 when moving
' Drop the SP
If GetPlayerSP(Index) > 0 Then
Call SetPlayerSP(Index, GetPlayerSP(Index) - 1)
Call SendSP(Index)
End If
End If
I hope this is good enough for a tutorial. Apologies if not. I got some help from dave and anthony - so its not totally all mine. although i did good! and all the extra stuff (i didnt put in here - unless ppl request an expansion) is mine wooooooooot!
Ive also added this into casting spells and added a bar under the sprite for movement (tiredness), and movement affects your combat and spell casting power. if you would like to see this code then let me know and ill gladly post it.
works great woot!