WoWInterface (
-   General Authoring Discussion (
-   -   Event that fires when starting to fly (

nKweo 04-25-18 02:36 AM

Event that fires when starting to fly
Hey guys, I'm looking for an event that fires when actually starting to fly (not just when getting mounted). FYI, I want to zoom the camera out on this event. So far I haven't found anything solid yet and maybe it's just not possible. Is it possible and if so, how? Thanks!

d87 04-25-18 02:57 AM

Try checking IsFlying() on PLAYER_STARTED_MOVING event

aallkkaa 04-25-18 03:28 AM

d87's idea sounds like it would work for your specific purpose. Mostly.

You see, PLAYER_STARTED_MOVING does not fire on player pitching up/down (nor when turning around nor jumping), it fires ONLY ON changing position on map.
Still, although your autozoom wouldn't fire if you were only "lifting up" vertically (jump key when on a flying mount), it would as soon as you started moving forward (or backwards, or strafing).

Kanegasi 04-25-18 03:44 AM

Ingame, type /etrace then mount and fly. Try a bunch of things like flying straight up or riding across the ground then lifting off. If the window gets too busy for you to determine what events you need, mouse over events you believe aren’t related and click the small red X to remove and hide them. You should probably clear the window of unwanted events as soon as you use /etrace before you do anything.

arith 04-25-18 04:11 AM

I have checked, it looks like there is no any event will be fired when you start to fly.

nKweo 04-25-18 04:37 AM

PLAYER_STARTED_MOVING works okayish, with the caveats aallkkaa mentioned. Thanks for mentioning /etrace by the way Kanegasi, wasn't aware of it. I guess the only way to make it work completely smooth is checking for IsFlying() with some form of OnUpdate, which seems a bit excessive...

Tim 04-25-18 10:49 AM

Can't really code and do testing as I'm at work but, some quick searching...

- Listen to successful spell casts
- Compare the ID of the cast to C_MountJournal.GetMountInfo(index)
- arg6 will return the needed info for flying mounts
-- However, it doesn't read self mounts (ie: sand drake) so you will want to get further info from C_MountJournal.GetMountInfoExtra(index)
- arg4 and 5 are the values you want

Ammako 04-25-18 11:00 AM

(C_MountJournal.GetMountInfo(index) does not exist anymore since 7.0.3 I thought?)

Index is not the same as mount ID anyway, so you can't check spell ID of cast to see which mount was used in this way.

Either way, even if this method worked, it would just tell you "you just mounted onto a (flying) mount", which doesn't really help since OP wants to check for when you actually start flying to zoom out the camera. That being said, doing it at mounting time may be the best available solution.

If you're fine with just zooming out as soon as you mount then this would be of interest to you. Otherwise DynamicCam handles this already, but I don't know if you can disable everything else and leave just the mount zoom out.

Tim 04-25-18 01:07 PM

You're right, it was replaced by: C_MountJournal.GetDisplayedMountInfo

Yes I know index is not the same as id. You'd have to iterate through C_MountJournal.GetNumDisplayedMounts and compare spellID from the spell cast event with mountID.

I didn't post and say it was the end all be all way to accomplish what the op wanted but merely to help with determining actual flying mounts. As it was already stated that up/down doesn't register anything so PLAYER_STARTED/STOPPED_MOVING events aren't sure proof. I would begin the zooming after mounting honestly. If that's too soon then perhaps add a timer then begin the zooming then or if PLAYER_STARTED_MOVING before the timer goes off then proceed.

nKweo 04-25-18 03:08 PM

Thanks for the input guys. I'm actually modifiying DynamicCam (great addon, hope it will be good for BfA!) to make it behave exactly the way I want it to.

The reason I wanted to zoom out while flying, is that I often play with the camera very close to my character and I also like this feel when mounted (gives the feeling that you're riding on the back). When flying with the camera this close, pretty much all I see is ass though haha. Turns out this is only the case for particular mounts though (also not ideal on the ground actually), so I made it fire only when mounting these particular mounts.

All times are GMT -6. The time now is 03:29 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI