Jump to content

nelsoncs

Developers
  • Posts

    35
  • Joined

  • Last visited

Everything posted by nelsoncs

  1. thanks, I stopped watching earlier when the spawner script was added to the flowgraph and a very short mention of "assigned it" was made.
  2. Looks like they may be attached to pivots.
  3. It is possible this is a linux problem. I recently went thru agror's tutorial on using the flowgraph editor. in the tutorial he is apparently able to create scripts, have them present in the scene tree and then drop and drag into the flowgraph editor. these actions do not seem to be working or I have missed the point somewhere. 1. I can add objects (ie cube etc.) to the flowgraph editor by right click-> etc. but not by drop and drag. 2. i can attach scripts to objects and the sub-lines and 'dots' show up properly in the flowgraph 2. I am unable to see or add standalone scripts in the scene tree (ie. timer.lua or spawner.lua in the tutorial), nor can I add them into the flow graph. would someone be kind enough to tell me how scripts are added into the scene tree, in the tutorial they are shown in the tree and then dragged to the flowgraph editor. Not happening for me. Thanks.
  4. Nice, thanks Rick. I can see I glossed over the members section when I read Command Reference > World.
  5. Juan, Thanks for the reference to your solution to obtain the camera from the editor/map in C++. this kind of pushed me in the right direction addressing my current problem. I have a design where new entities will be created after the map has been loaded, so I wanted to be able to use the World::ForEachEntity....() functions from within a given, non-Leadwerks::Object class. This turned out to be somewhat difficult to figure out but I think I have a solution. The code below is what I used as an experiment to get the entity class names printed on my console widget. 1. SomeClass.h ... (prototype) static void entityClass ( Leadwerks::Entity * entity, Leadwerks::Object* extra ); // this is the declaration for a callback function, it has to be static 2. SomeClass.cpp ... (using the callback function, maybe in the constructor, notice that the 'this' pointer for the classinstance is cast to a leadwerks object pointer and passed in as a parameter) world->ForEachEntityInAABBDo( aabb, &entityClass, (Leadwerks::Object *) this ); 3. SomeClass.cpp ... void SomeClass::entityClass(Leadwerks::Entity * entity, Leadwerks::Object* extra) { std::string str ( entity->GetClassName() ); cout << "Attack::entityClass: " << str << '\n'; ((SomeClass *) extra)->getConsole()->addText( &str ); } // Note: "ForEachEntityInAABBDo" seems to require that the // callback function be static. This creates a really big problem // if trying to get data back into a C++ class because a static function // has no idea what class instance you are interested in. So, this solution // casts the current class instance pointer (this) to a Leadwerks Object // and then casts back to the cognate Class *. Seems to work but // the assumption is that there is never a problem with pointer // Implementations at runtime. I was going take the time to confirm that the pointer thunks were ok using Valgrind, but I get so many reported memory leaks from within the engine, thus obsfucating my inspection, that I may wait till something breaks. So, now that I can access basic data for entites created in the Leadwerks editor at anytime, it is on towards making use of their Lua scripts from C++.......
  6. can someone point me to a tutorial or reference showing how to use lua scripted objects from c++? thanks
  7. Super, thanks Aggror. Looks like I need to read up on compression.
  8. I am trying to use Context::DrawImage(). When I create a .png image with a transparent alpha channel (screen shot #1) it has a transparent background. When I load this using DrawImage or when I view the auto-created texture in Leadwerks Ide, the background is solid black. Where have I gone wrong or how do I obtain a transparent .tex alpha channel? thanks
  9. Any chance of Eclipse project templates for Linux instead of Code Blocks? Thanks.
×
×
  • Create New...