Papa Beans Posted January 19, 2014 Share Posted January 19, 2014 Hello everyone. I really feel like 3.1 is lacking materials / tutorials out there for lua scripting. I do not personally know lua but am starting to learn. Below I show you guys how to display a Custom font and how to display text to the screen. I hope you enjoy! It is in 1080p Youtube just has to render it http://www.youtube.com/watch?v=b4fZx9wQ0jM P.S. I linked the custom code colors to this thread. Feel free to use them if you like them 2 Quote Link to comment Share on other sites More sharing options...
Papa Beans Posted January 19, 2014 Author Share Posted January 19, 2014 Wow forgot to post the video! Problem solved! Quote Link to comment Share on other sites More sharing options...
Rick Posted January 19, 2014 Share Posted January 19, 2014 Nice tutorial man. You could also put that code in the weapon or player script also since then it would have access directly to some ammo variable and know when the gun is fired to reduce ammo, but putting it in a pivot is also a valid option. If you put it in a pivot you'd want to make some kind of output called from the player/weapon script and connect that output with some kind of input to the UI script and hook those up in the flowgraph so your UI script can be informed when the ammo changes. I know this was more about fonts, but just giving you options and things to think about with your next tutorial on ammo/clips. I personally like the separation of scripts between the UI and the player, but it requires a little more hookups via the flowgraph to work. We used to be able to attach multiple scripts to an entity, which I thought was nice, but that was removed so pivots are the next best way to get this kind of separation. If you want to make easy and reusable scripts separating them is the way to go. 2 Quote Link to comment Share on other sites More sharing options...
Papa Beans Posted January 19, 2014 Author Share Posted January 19, 2014 Thank you for the feedback. I am working on how to work with flowgraphs right now actually! I will try and do it the correct way, using flowgraphs, instead of my cheap way. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 19, 2014 Share Posted January 19, 2014 I wouldn't call flowgraphs the "correct" way. It's just one way to do it. The benefits are it helps avoid direct dependencies between scripts. This makes your scripts more component like that people can connect together with the flowgraph. Some people don't care about that and will just make direct dependencies of other scripts. I personally don't like that, but to each their own Quote Link to comment Share on other sites More sharing options...
Mordred Posted January 19, 2014 Share Posted January 19, 2014 Just to make you know it's appreciated that you did that tutorial Thank you for showing the way. Please continue with those tutorials. If i may suggest: I'm always curious why things are done they way they're done. That's because it's easier for me to understand why something works if i have some explanation for it, so not sure how others see it, but it would be cool if you could explain why smth. does not work with "Setting A" but does with "Setting B" (if you can explain it - i know there are some things that you just "know" but you're not sure "why" ) 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted January 19, 2014 Share Posted January 19, 2014 Nice color scheme in the Lua IDE. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Papa Beans Posted January 20, 2014 Author Share Posted January 20, 2014 Nice color scheme in the Lua IDE. Thank you. I find it a bit nicer to look at when my eyes are strained ^,^ Quote Link to comment Share on other sites More sharing options...
nate066 Posted January 20, 2014 Share Posted January 20, 2014 Nice color scheme in the Lua IDE. Could you add support for changing the background color of the main editor. so that we can make it a dark grey. To fix the icons that are black if the color goes below a certain darkness threshhold you invert the color of the icons. Because it would be nice to work in a darker grey. It looks cooler and when your working in a dark place its not so bright. Quote Link to comment Share on other sites More sharing options...
Papa Beans Posted January 20, 2014 Author Share Posted January 20, 2014 Could you add support for changing the background color of the main editor. so that we can make it a dark grey. To fix the icons that are black if the color goes below a certain darkness threshhold you invert the color of the icons. Because it would be nice to work in a darker grey. It looks cooler and when your working in a dark place its not so bright. I don't think that it is possible to change the color of the main editor, or else I would. You should put this in the recomendations forum! 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.