stefutz101 Posted September 1, 2015 Posted September 1, 2015 local x,y,z = getElementPosition(newbiePosition) local x1,y1,z1 = getScreenFromWorldPosition(x,y,z) local length = dxGetTextWidth(newbieText,1,"default-bold") dxDrawImage ( x1-length/2-screenWidth*0.01,y1, screenWidth*0.101, screenHeight*0.09, "images/lootTable.png",0,0,0,tocolor(255,255,255)) I dont see problem , x1 is defined. Any help , please ?
Moderators IIYAMA Posted September 1, 2015 Moderators Posted September 1, 2015 x1 is defined, yet the function getScreenFromWorldPosition can't return correct values, because that position is behind your camera. Add line between line 2 and 3: if x1 then And of course add an end... end P.s: z1 is nothing.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now