Quantcast Event that fires when starting to fly - WoWInterface
Thread Tools Display Modes
04-25-18, 02:36 AM   #1
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar
Join Date: Oct 2012
Posts: 16
Question 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!
  Reply With Quote
04-25-18, 02:57 AM   #2
d87
A Flamescale Wyrmkin
 
d87's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 121
Try checking IsFlying() on PLAYER_STARTED_MOVING event
  Reply With Quote
04-25-18, 03:28 AM   #3
aallkkaa
A Theradrim Guardian
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 62
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).
  Reply With Quote
04-25-18, 03:44 AM   #4
Kanegasi
A Cobalt Mageweaver
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 229
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.
  Reply With Quote
04-25-18, 04:11 AM   #5
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 41
I have checked, it looks like there is no any event will be fired when you start to fly.
  Reply With Quote
04-25-18, 04:37 AM   #6
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar
Join Date: Oct 2012
Posts: 16
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...
  Reply With Quote
04-25-18, 10:49 AM   #7
Tim
A Cobalt Mageweaver
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 233
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
__________________
AddOns: [email protected]
Website: Ciraxe' Shenanigans
Chars: Monk, Viskaz, Mage, Shaman
  Reply With Quote
04-25-18, 11:00 AM   #8
Ammako
A Cobalt Mageweaver
 
Ammako's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 217
(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.
__________________
█████████████
█████████████
█████████████
█████████████

Last edited by Ammako : 04-25-18 at 11:11 AM.
  Reply With Quote
04-25-18, 01:07 PM   #9
Tim
A Cobalt Mageweaver
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 233
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.
__________________
AddOns: [email protected]
Website: Ciraxe' Shenanigans
Chars: Monk, Viskaz, Mage, Shaman
  Reply With Quote
04-25-18, 03:08 PM   #10
nKweo
A Deviate Faerie Dragon
 
nKweo's Avatar
Join Date: Oct 2012
Posts: 16
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.

Last edited by nKweo : 04-25-18 at 04:10 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Event that fires when starting to fly

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off