Jump to content

Roland

Members
  • Posts

    2,953
  • Joined

  • Last visited

Everything posted by Roland

  1. Would it be possible to have some checkbox for turning off the green wireframe of the terrain while working. It's really annoying to have it in front of what your doing all the time.
  2. True Rick. But how do you rotate a folder
  3. Add a Pivot and drag your objects into that (as Childs) and you have your Group.
  4. DrawText only accepts strings. One example on how to. #include <sstream> void draw_float( Context* c, int x, int y, float val ) { std::ostringstream s; s << val; c->DrawText( s.str(), x, y ); }
  5. Yes. That's another way to achieve same effect. However, a singleton gives you control over when the class is instantiated. A static class is less controllable and is instantiated before main is called. The sequence in which classes is instantiated can sometimes be critical when the singleton depends on some other class or resource which is not available before main is called.
  6. Thanks. This thread really made me worried after have spent time finally learning cpp<-->lua work together. It's okay to ADD BMax of course if it not breaks current Lua connection.
  7. A Singleton is a class which will only have one and only one instance in your project. The Singleton can be accessed from anywhere.Here is how to make a Singleton class: class MySingleton { private: MySingleton() {} // Prevent users from making instances public: static MySingleton& instance() // returns the one and only instance { static MySingleton instance; return instance; } void SayHello() { System:Print( "Hello"); } }; Now you can use it anywhere in any project file like this MySingleton::instance().SayHello();
  8. Just absolutely great of you. Thanks
  9. Will do that if I take it up again. Good idea
  10. Those tutorials are about general C++ programming aimed towards Leadwerks. I was planning of doing more of them but didn't because there was very few viewers. However if you are totally new to C++ its a good start as start assuming you know absolutely nothing. I talk quite slowly as English is not my native language.
  11. Tested a bit and it seems that its not supported
  12. Can self.component:CallOutput( "something" ) give a return value ? Means that the in-function returns a value that is passed to the CallOutput return Lua1.lua -------------------------------------------------------------------------------- function Script:func() local retval = self.component:CallOutput( "something" ) System:Print( retval ) -- prints "Hello" ? end Lua2.lua --------------------------------------------------------------------------------- function Script:something()--in return "Hello" end
  13. To make it more clear then. Tell me where I can find description on Script definitions on IN, OUT and ARG, how to use them from LUA. That documentation used to be here http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/object-scripts-r631 http://www.leadwerks.com/werkspace/page/documentation/_/user-guide/flowgraph-editor-r17 Einlander had a backup though at https://archive.is/6puJx
  14. Thank's a lot Einlander. Hahaha.. Refering to my own thread. I'm getting really old Altzheimers here I come
  15. Where did the scripting documentation for FlowGraph go? I can't remember how to add parameters with In/Out and was going to check that but the documentation is gone.
  16. In FPSPlayer.lua i can see an undocumented member entity.script.enabled Can we use that one or is it some internal stuff that may be changed
  17. Okay. I can confirm that adding a 'dummy' empty script to the child solves the problem. I really don't see why this has to be done, but accept it as a solution . But its a bit tricky when things behaves different in the editor and in run-time. Thanks macklebee
×
×
  • Create New...