Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Lightning's Pet System.. Speeding up pet's movement?


DopeyBiach
 Share

Recommended Posts

First of I would like to say THANK YOU Lightning.. Ive been waiting to use this amazing system for a LONG time, and it's everything I wanted it to be and more.. All I need to make it perfect is..

My pet to walk faster than a house  :P

I've tried a few things like in the NPC Movement part

```
Select Case MapNpc(MapNpcNum).Dir
            Case DIR_UP

                If MapNpc(MapNpcNum).IsPet Then
                MapNpc(MapNpcNum).YOffset = MapNpc(MapNpcNum).YOffset - ((ElapsedTime / 1000) * (RUN_SPEED * SIZE_X))
                          Else
                  If MapNpc(MapNpcNum).YOffset < 0 Then MapNpc(MapNpcNum).YOffset = 0
                MapNpc(MapNpcNum).YOffset = MapNpc(MapNpcNum).YOffset - ((ElapsedTime / 1000) * (WALK_SPEED * SIZE_X))
```
But.. Obviously it didn't work.. But hopefully you'll see what I'm trying to achieve and help me out? Thanks again everyone :D
Link to comment
Share on other sites

_…blows cobwebs off of source code._

Server > modServerLoop > Sub ServerLoop. Look for the call to "UpdateMapLogic". Underneath it, there will be this line of code:

```
tmr500 = GetTickCount
```
Change the '500' to a smaller number. Be warned though, this speeds up all NPC movement, seeing as pets are implemented as NPC's on a map.
Link to comment
Share on other sites

_…re-writes and polishes source code._

Thank you so much!! :]

Wish I could repay you for the system, buh I fail at VB  :P

Thanks again ^____^

EDIT: It's perfect on a large map now, but buzzes around the screen at 200mph on a small map, im slowly getting there after playing about with it, but id rather a pet road runner than a pet rock lul.

EDIT AGAIN: Maaaaybe.. If I made a new npc behaviour called 'Pet' I could speed it up that way.. Maybe :o

Thank you sooo much :D
Link to comment
Share on other sites

  • 2 weeks later...
Sorry the speed is perfect the way it is, it was something that I did not you did. But what you told me got the movement abit faster and perfect anyway, I haven't been able to reply on here because my internet's credit was out, cheers again Lightning I LOVE this system :D
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...