| Mirage Source http://www.miragesource.net/forums/ |
|
| Stop Running http://www.miragesource.net/forums/viewtopic.php?f=201&t=4858 |
Page 1 of 1 |
| Author: | jsventor [ Thu Dec 18, 2008 12:12 am ] |
| Post subject: | Stop Running |
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 Moved = NO Exit Sub End If This takes away SP.. 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 |
|
| Author: | Nean [ Thu Dec 18, 2008 1:58 am ] |
| Post subject: | Re: Stop Running |
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
|
|
| Author: | Tony [ Thu Dec 18, 2008 8:31 am ] |
| Post subject: | Re: Stop Running |
Code: If Player(Index).Moving = MOVING_RUNNING and GetPlayerSP(index) > 0 then
Call SetPlayerSP(index, GetPlayerSP(index) - 1) Call SendSP(index) elseif GetPlayerSP(index) <= 0 then Player(Index).Moving = MOVING_WALKING End If |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|