Jump to content

Roland

Developers
  • Posts

    2,953
  • Joined

  • Last visited

Everything posted by Roland

  1. Add a Pivot and drag your objects into that (as Childs) and you have your Group.
  2. 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 ); }
  3. 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.
  4. 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.
  5. 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();
  6. Just absolutely great of you. Thanks
  7. Will do that if I take it up again. Good idea
  8. 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.
  9. Tested a bit and it seems that its not supported
  10. 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
  11. Thank's a lot Einlander. Hahaha.. Refering to my own thread. I'm getting really old Altzheimers here I come
  12. 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.
  13. 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
  14. 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
  15. Maybe a bug or behavior by design? If you have a CGS object with a child object. In the editor the child will rotate along with the parent object when the parent is rotated. That's Ok and expected behavior. However if you rotate the parent object by a script (simple Turn command) the child does not rotate, only the parent. Tested same thing with two mesh objects (fbx) and in that case both rotates as expected when parent is rotated (both by script and in the editor)
  16. YES! Grid Snap .... a milestone Thanks Josh
  17. Okay. Yes. That was just a tiny cylinder (a surrogate for a key). No problem and good to know. I'll keep that in mind. Thanks
  18. Okay. I have now tested with high lighting quality. No change. The shadow becomes a bit more blurry but thats all. Just for the sake of testing I turn ALL setting to their highest levels and same result, so I begin to think this either an Engine limitation or a bug
  19. Thanks for the suggestion. Will not be able to test until tomorrow. Will report then how it goes.
×
×
  • Create New...