Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stop Running
#1
2 problems..

1. I want it so that when I RUN and RUn only it takes away SP, it takes away when I walk as well..
2. It doesnt stop moving when SP reaches 0..

In sub PlayerMove I added,
Code:
If GetPlayerSP(index)  0 Then
        Call SetPlayerSP(index, GetPlayerSP(index) - 1)
        Call SendSP(index)
      End If
    End If
Reply
#2
For
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

You should do a check to see if shift is pressed as well. Otherwise it'll just see if you're moving altogether, not running.

Something like this:
Code:
If Player(Index).Moving = MOVING_RUNNING Then
Reply
#3
[code]If Player(Index).Moving = MOVING_RUNNING and GetPlayerSP(index) > 0 then
Call SetPlayerSP(index, GetPlayerSP(index) - 1)
Call SendSP(index)
elseif GetPlayerSP(index)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)