Dan22 Posted April 29, 2014 Share Posted April 29, 2014 Hello, I am currently using the beta version of leadwerks and some errors have occured: Draw_Text shows white blocks instead of the font: As you can see on the top left they do not show. They use to work and now it no longer works even having not altering it in anyway. Sound will not stop after lvl change, even if the sound is not in the level once it has changed it still continues, I even tried using a button to stop it and it still doesn't stop. Flowgraph trying to stop the sound: Video: After level change it still continues, even if I use a button as above. If theres any person ways to fix these issues, please post below. -Thanks Quote Link to comment Share on other sites More sharing options...
gamecreator Posted April 29, 2014 Share Posted April 29, 2014 The white text blocks look like you didn't set the blend mode to Alpha before drawing the text. See this example: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/context/contextdrawtext-r731 Quote Link to comment Share on other sites More sharing options...
Dan22 Posted April 29, 2014 Author Share Posted April 29, 2014 I was using a draw_text script from downloads: http://www.leadwerks.com/werkspace/files/file/464-draw-text/ Script: Script.Text = "Enter Text Here"--StringScript.X = 0 --Int "X Position" Script.Y = 0 --Int "Y Position" Script.FontSize = 32 --Int "Font Size" Script.Text_On = true --bool "Default On" function Script:Start() TextConfirm = self.Text_On self.context = Context:GetCurrent() self.window = self.context:GetWindow() local font = Font:Load("Fonts/Coalition_v2..ttf",self.FontSize) self.context:SetFont(font) end function Script:PostRender(context) if (TextConfirm == true) then self.context:SetColor(148,8,8) self.context:DrawText(self.Text, self.X,self.Y) self.context:SetBlendMode(Blend.Solid) end end function Script:TextOn()--in TextConfirm = true end function Script:TextOff()--in TextConfirm = false end Also, it isn't because its a custom font, I used arial aswell and same results. I will see if thats the problem. -Update: I changed it to alpha blend but still same problem. Quote Link to comment Share on other sites More sharing options...
Dan22 Posted April 29, 2014 Author Share Posted April 29, 2014 I can now say the Text randomly fixed itself, or something fixed it. But the sound is still a problem. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted April 30, 2014 Share Posted April 30, 2014 Something that is unclear to me in the flowgraph: If you use the button, you both enable and disable the sound? What you can do is adding an output to the load level script that disables your sound from playing. The output would be called before you actually load the level. It would look like this: Quote Link to comment Share on other sites More sharing options...
Dan22 Posted April 30, 2014 Author Share Posted April 30, 2014 I Changed the function function Script:Disable()--in self.enabled=false end To, function Script:Disable()--in self.source:SetVolume(self.volume/999999999) end And this basicly stops the sound. Fixed now. However the guy who made the script should fix it. Quote Link to comment Share on other sites More sharing options...
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.