View Full Version : Target of Target and Target of Target's Target... help the n00b!
Roath
07-07-2006, 07:21 AM
I am a n00b when it comes to coding LUA and such, i know a little, but far from enough to solve a problem -_-
so, im turning to you, all-knowing people :P
http://img221.imageshack.us/img221/448/unitframe23fo.jpg (http://imageshack.us)
as you can see from this screenshot, i modified the ToT and ToTT to have a model, HOWEVER, for some reason it places the model below the backdrop... please help me fix it.
Also as you can see on the screenshot, the model does not update with the name... how do i make the model update along with the ToT and ToTT name?
please help the n00b here :S
Also... the name of the target appears on top of the PVP icon when its shown, how to i switch that so that the name is below the icon?
i would try this to get the models updated properly
Nurfed_Unit_model = {
type = "PlayerModel",
FrameStrata = "LOW",
events = {
"PLAYER_ENTERING_WORLD",
"DISPLAY_SIZE_CHANGED",
"UNIT_MODEL_CHANGED",
"UNIT_NAME_UPDATE",
},
ModelScale = 1.9,
Camera = 0,
FrameLevel = 1,
OnEvent = function() if (event == "DISPLAY_SIZE_CHANGED") then this:RefreshUnit() elseif (event == "UNIT_NAME_UPDATE") then this:RefreshUnit() elseif (this:GetParent().unit) then this:SetUnit(this:GetParent().unit) end end end,
OnUpdate = function() this:SetCamera(0) end,
},
don't know if the added 'end' is needed.
would be nice if you could post the code u used as it's easier to help when you know the code.
Roath
07-07-2006, 09:05 AM
Nurfed_Unit_model = {
type = "PlayerModel",
FrameStrata = "LOW",
events = {
"PLAYER_ENTERING_WORLD",
"DISPLAY_SIZE_CHANGED",
"UNIT_MODEL_CHANGED",
"UNIT_NAME_UPDATE",
},
ModelScale = 1.9,
Camera = 0,
FrameLevel = 1,
OnEvent = function() if (event == "DISPLAY_SIZE_CHANGED") then this:RefreshUnit() elseif (event == "UNIT_NAME_UPDATE") then this:RefreshUnit() elseif (this:GetParent().unit) then this:SetUnit(this:GetParent().unit) end end,
OnUpdate = function() this:SetCamera(0) end,
},
is what i use now, your code has been added, however adding a third end gives me an error, something about ( being to close to an { or something, but there aint no { on the line it says it is :S
so .. is the model updated when the name changes? :>
Roath
07-07-2006, 09:46 AM
well, it now shows up when i target someone that has a target before i targetted him, however if i target someone that doesn't have a target and they get a target while im targeting them, the model doesn't show
also, the model doesn't change when the target changes target, only very few times
aertifact
07-07-2006, 12:12 PM
Can you just upload the whole lua fule please, so I can have a look.
Roath
07-08-2006, 08:08 AM
http://rapidshare.de/files/25289405/Layout.lua.html
that is my current layout, hope it helps you help me with my problem :S
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.