[vehicleui]

UI and Macro
So how come [vehicleui] is showing false in quite a few of the "vehicle" interfaces introduced in MoP?

My generic "dismount" macro looks to see if you're in a vehicle and exit if so by doing

/leavevehicle [vehicleui]

There are quite a few cases (e.g. the cloud rider sky race) where the conditional isn't true, yet the way to exit IS to use /leavevehicle

I'd think that if /leavevehicle works, then [vehicleui] should indicate true, in all cases.
vehicleui doesn't check if you're in a vehicle, it checks if you have a vehicle UI, which seems blatantly obvious to me. Not all vehicles have UIs.

Why not just do /leavevehicle without checking? If you're in a vehicle it will make you leave and if not nothing will happen, which is what you seem to want...
They DO have a vehicle UI, i.e. there's a bar up which lets you do various actions, there's a "leave vehicle" button, etc. I'm not aware of any vehicle that you can leave that doesn't have SOME sort of vehicle UI (which implies that your normal action bar is unavailable), certainly not the one I referenced.

My macro also conditionally dismounts, cancels form, and casts Two Forms, plus /leavevehicle gives an error message if you're not in a vehicle (yes, I know I can turn that off, but that's dumb).
vehicleui does not apply to everything that you consider a vehicle from a programming standpoint. For example, if you did the children's week, you'd hop into the bike and you'd be driving the kid around showing him sights around westfall. Yet you had no controls and that did not technically count as vehicle UI at all, though you have the exit button and don't see your actionbar and have no control over your toon.

If you plant seeds on the farm and deal with vines, you have the true vehicleui with buttons you control and that does count as vehicleui.
You're gonna have to contend with

/leavevehicle
/run UIErrorsFrame:Clear()
You could use this instead:/run if CanExitVehicle() then VehicleExit() end
Yet you had no controls and that did not technically count as vehicle UI at all, though you have the exit button and don't see your actionbar and have no control over your toon.

That's an example of the problem, not an explanation of why it isn't a problem. If you have any vehicle control, including an exit vehicle button, then [vehicleui] should be true, and if /vehicleexit works, then that exit button is obviously a vehicle control.

Not sure what the use of the conditional is if not to detect when there's a vehicle interface present...not sure what it shows when you're in a vehicle AND you have your regular action bar available.

I can use the script, but I can't stop the macro with it in combat (StopMacro() is protected).
and if /vehicleexit works, then that exit button is obviously a vehicle control.

No that is not necessarily true. Darkmoon faire games for example used an overridebar and not a vehicleui and yet they still have an exit vehicle button. I think same applies for pet battles. They were implemented much later so vehicle exit button doesn't reflect by name that it's really an exit button for multiple bars/states now.

You could try

/leavevehicle [vehicleui][overridebar][possessbar]

and see if one of those perhaps catches the situation you're trying to get out of but I haven't tried it personally and not sure even those cover all of the applicable situations. A no conditions check I think is still a better solution.

Join the Conversation

Return to Forum