Rick Posted December 30, 2009 Share Posted December 30, 2009 Say I want to have one of my object functions draw text onto the screen. What's the usage of the flip hook? Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 30, 2009 Share Posted December 30, 2009 Say I want to have one of my object functions draw text onto the screen. What's the usage of the flip hook? go over the tutorial. it gives an example of the flip hook. Getting Started Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Rick Posted December 30, 2009 Author Share Posted December 30, 2009 So what is RunHooks() all about? In the examples on there it's not being called anywhere I can see. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 30, 2009 Share Posted December 30, 2009 It's used in hooks.lua. 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...
Rick Posted December 30, 2009 Author Share Posted December 30, 2009 Right, but I assume it actually runs the hooks I have defined, yet in the example I don't see it being called anywhere. [EDIT] I guess it doesn't need to be. Worked without calling RunHooks() myself. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 30, 2009 Author Share Posted December 30, 2009 Can this function also be part of the class itself instead of a global function? I can't seem to get that to work. Not that it's a big deal, but it would just be cleaner. 1 1 Quote Link to comment Share on other sites More sharing options...
TylerH Posted December 30, 2009 Share Posted December 30, 2009 I second that. 1 1 Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Rick Posted December 30, 2009 Author Share Posted December 30, 2009 Also, sorry if I wasn't clear, but I mean I want my custom flip function that I add as a hook to be able to be part of my class object and not outside of it. So like: function class:CreateObject(model) local object=self.super:CreateObject(model) function object:MyFlip() end AddHook("Flip", object:MyFlip) end 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.