View Single Post
11-27-10, 10:34 AM   #2
Waky
A Cobalt Mageweaver
 
Waky's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2010
Posts: 200
Try this out:

Code:
--OnEvent (Panel 1):
if event == "UNIT_ENTERED_VEHICLE" then
	if (CanExitVehicle()==1) then
		self:Hide()
	end
elseif event == "UNIT_EXITED_VEHICLE" then
	if (CanExitVehicle()==nil) then
		self:Show()
	end
end

--OnEvent (Panel 2):
if event == "UNIT_ENTERED_VEHICLE" then
    if (CanExitVehicle()==1) then
		self:Show()
	end
elseif event == "UNIT_EXITED_VEHICLE" then
    if (CanExitVehicle()==nil) then
		self:Hide()
	end
end
To my understanding it's exactly what you said would be wrong, that event listens for anyone to enter/leave a vehicle so it'd be going crazy on and off without you.

Lemme know if this works!
  Reply With Quote