Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Anyone know any TC functions to get a unit’s current speed?

[DiscordArchive] Anyone know any TC functions to get a unit’s current speed?

[DiscordArchive] Anyone know any TC functions to get a unit’s current speed?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
09-11-2023, 10:21 AM
#1
Archived author: will0x539 • Posted: 2023-09-10T22:00:01.553000+00:00
Original source

Anyone know any TC functions to get a unit’s current speed?
rektbyfaith
09-11-2023, 10:21 AM #1

Archived author: will0x539 • Posted: 2023-09-10T22:00:01.553000+00:00
Original source

Anyone know any TC functions to get a unit’s current speed?

rektbyfaith
Administrator
0
09-11-2023, 10:30 AM
#2
Archived author: Kiffy • Posted: 2023-09-11T10:30:33.273000+00:00
Original source

GetSpeed(movetype) and GetSpeedRate(movetype) to include modified speed maybe?
you could maybe also use eventoffset lambda function which is a bit convoluted but would allow you to do an actual position difference over time calculation for speed and do something with that, I could provide an example if youre interested
rektbyfaith
09-11-2023, 10:30 AM #2

Archived author: Kiffy • Posted: 2023-09-11T10:30:33.273000+00:00
Original source

GetSpeed(movetype) and GetSpeedRate(movetype) to include modified speed maybe?
you could maybe also use eventoffset lambda function which is a bit convoluted but would allow you to do an actual position difference over time calculation for speed and do something with that, I could provide an example if youre interested

rektbyfaith
Administrator
0
09-11-2023, 10:38 AM
#3
Archived author: stoneharry • Posted: 2023-09-11T10:38:36.186000+00:00
Original source

Pretty sure get speed returns the speed without any modifiers (e.g slow aura)
rektbyfaith
09-11-2023, 10:38 AM #3

Archived author: stoneharry • Posted: 2023-09-11T10:38:36.186000+00:00
Original source

Pretty sure get speed returns the speed without any modifiers (e.g slow aura)

rektbyfaith
Administrator
0
09-11-2023, 10:50 AM
#4
Archived author: will0x539 • Posted: 2023-09-11T10:50:21.804000+00:00
Original source

Well, afaik while Unit::GetSpeed does indeed give us a speed, it seems to give us the params of the speed (it takes a UnitMoveType and give us the unit's speed during that move type) and not the current speed. So we either need a way to get the current speed, or the current movement type so we can use Unit::GetSpeed along with it to figure out the current actual speed. Dunno if that makes much sense
rektbyfaith
09-11-2023, 10:50 AM #4

Archived author: will0x539 • Posted: 2023-09-11T10:50:21.804000+00:00
Original source

Well, afaik while Unit::GetSpeed does indeed give us a speed, it seems to give us the params of the speed (it takes a UnitMoveType and give us the unit's speed during that move type) and not the current speed. So we either need a way to get the current speed, or the current movement type so we can use Unit::GetSpeed along with it to figure out the current actual speed. Dunno if that makes much sense

rektbyfaith
Administrator
0
09-11-2023, 10:51 AM
#5
Archived author: will0x539 • Posted: 2023-09-11T10:51:05.284000+00:00
Original source

also need vertical speed, strafe speed and direction
rektbyfaith
09-11-2023, 10:51 AM #5

Archived author: will0x539 • Posted: 2023-09-11T10:51:05.284000+00:00
Original source

also need vertical speed, strafe speed and direction

rektbyfaith
Administrator
0
09-11-2023, 10:52 AM
#6
Archived author: stoneharry • Posted: 2023-09-11T10:52:29.513000+00:00
Original source

You'll likely need to expose more of the movement class internals. (not looked at code)
rektbyfaith
09-11-2023, 10:52 AM #6

Archived author: stoneharry • Posted: 2023-09-11T10:52:29.513000+00:00
Original source

You'll likely need to expose more of the movement class internals. (not looked at code)

rektbyfaith
Administrator
0
09-11-2023, 10:53 AM
#7
Archived author: Kiffy • Posted: 2023-09-11T10:53:40.175000+00:00
Original source

you could get the movement types in a switch by checking for IsWalking, IsFlying* etc. but direction and all that would make me opt for doing positional calculations manually
rektbyfaith
09-11-2023, 10:53 AM #7

Archived author: Kiffy • Posted: 2023-09-11T10:53:40.175000+00:00
Original source

you could get the movement types in a switch by checking for IsWalking, IsFlying* etc. but direction and all that would make me opt for doing positional calculations manually

rektbyfaith
Administrator
0
09-11-2023, 10:54 AM
#8
Archived author: stoneharry • Posted: 2023-09-11T10:54:10.261000+00:00
Original source

Not sure the server even tracks it 100%, it trusts the client and verifies it within a threshold occasionally
rektbyfaith
09-11-2023, 10:54 AM #8

Archived author: stoneharry • Posted: 2023-09-11T10:54:10.261000+00:00
Original source

Not sure the server even tracks it 100%, it trusts the client and verifies it within a threshold occasionally

rektbyfaith
Administrator
0
09-11-2023, 10:54 AM
#9
Archived author: will0x539 • Posted: 2023-09-11T10:54:20.518000+00:00
Original source

Yes i think i agree
rektbyfaith
09-11-2023, 10:54 AM #9

Archived author: will0x539 • Posted: 2023-09-11T10:54:20.518000+00:00
Original source

Yes i think i agree

rektbyfaith
Administrator
0
09-11-2023, 10:54 AM
#10
Archived author: stoneharry • Posted: 2023-09-11T10:54:25.841000+00:00
Original source

Of course you can calculate what it should be at any point
rektbyfaith
09-11-2023, 10:54 AM #10

Archived author: stoneharry • Posted: 2023-09-11T10:54:25.841000+00:00
Original source

Of course you can calculate what it should be at any point

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)