DooMAGE Posted December 6, 2016 Posted December 6, 2016 Hello friends, I have a crosshair script that works well, I just followed the example in the FPSPlayer.lua function Script:Start() self.crosshairImg = Texture:Load("Materials/HUD/dot_1.tex") end function Script:PostRender(context) if self.crosshairImg then local crossHairX = math.floor((context:GetWidth() - self.crosshairImg:GetWidth()))/2 local crossHairY = math.floor((context:GetHeight() - self.crosshairImg:GetHeight()))/2 context:SetBlendMode(Blend.Alpha) context:DrawImage(self.crosshairImg, crossHairX, crossHairY) end end But when I try to fade in/out a text on another script with: context:SetColor(0,0,0,Math:Lerp(0, 1, self.alpha/self.fadeTime)) The texture in the crosshair gets the same color of my text and also fades What I'm doing wrong? Quote My Leadwerks games! https://ragingmages.itch.io/
Josh Posted December 6, 2016 Posted December 6, 2016 Call this after the draw call in the other script: context:SetColor(1,1,1,1) 1 Quote Let's build cool stuff and have fun.
DooMAGE Posted December 6, 2016 Author Posted December 6, 2016 This fixed, thanks Quote My Leadwerks games! https://ragingmages.itch.io/
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.