Jump to content

martyj

Members
  • Posts

    544
  • Joined

  • Last visited

Posts posted by martyj

  1. I think your question might be related to mine. Basically you have entities in the map that you wish to use c++ code with.

     

    http://www.leadwerks.com/werkspace/topic/11361-inheritance-and-entity-objects/

     

    Here is the solution that I came up with.

     

    Create classes in C++ for your entity. Have the classes use Hooks http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/object/

     

    Using ToLua++, you can create a Lua function to assign your entity to a class that has an entity property.

    http://lua-users.org/wiki/BindingCodeToLua

  2. Ok, I see one problem fixed. Using Hooks you can recieve the in game-events from the engine.

     

    How do I take an entity in LE3's map and easily tie it to a class?

     

    The only thing I can think of is creating a ToLua++ function to register an object to a native class.

     

    Can anyone thing of a better way?

     

    Thanks for the input everyone.

  3. Make sure you can see the animation by editing the model in leadwerks.

     

    You should see something in the animation tab when you right click and select "edit" on the model in the Assets view.

     

    In order to animate when running your map you need to set the script to animate the model. There is a test animation script named SimpleAnimation.lua in Scripts/Objects/Animations/

  4. I was wondering how we could use inheritance with the Entity class to allow code re-use

     

    For example, I have an animaited model, (a Knight)

    I have another animated model, (a Bat)

     

    I want the Knight and Bat to have a few functions to start animations, a generic drawing, ect.

     

    I want the Knight and Bat to also have seperate functions as well such as the Bat will Fly(), where as the Knight will Walk().

     

    How could I tie a leadwerks Entity with a custom overloaded class to handle the comonalities of these two objects, but also allow for the unique functions for their class.

     

    I should mention I'd like to be abe to add these Entities with the GUI editor.

     

    Basically in C++ I want to have something like this:

     

     

    class AnimatedModel : Entity

    {

    public:

    void StartAnimation(Sequence, Duration, Loop, DistanceBased);

    }

     

    class Knight : AnimatedModel

    {

    public:

    void Walk();

    }

     

    class Bat : AnimatedModel

    {

    public:

    void Fly();

    }

     

    Using ToLua++ these could be callable in Lua.

  5. Is there seomthing in code we can do to fix this?

     

    I've tried applying rotations before calling Entity::GoToPoint and it still moves the model facing backwards.

     

    For some reason 3ds Max is having errors when I try to import my model, so I can't seem to just rotate it on my own.

  6. I was wondering if Standard Edition projects can be used with the Indy Edition?

     

    I want to buy the standard edition so I can use the C++ features, but I have some friends working on a project with me who don't program so the Indy edition is all the features they would need, but I would like them to be able to work with projects modifed with the Standard Edition, even run them.

     

    Will this work? Or will I have to upgrade everyone to Standard edition in order to get C++ features for myself?

  7. @Rastar The heightmap is for a MMO. Is there a easy way to switch out different terrains depending on the area you are in?

     

    I don't need to implmenet the full sized for a while but in the full vision I would want to.

     

    I just want to know is it possible to have, let's say a WoW sized terrain with leadwerks. Even if it's soley in the C++ version

  8. I'm using Leadwerks 3.1 (Steam edition) atm. I will upgrade as soon as the C++ version comes out.

     

    I was wondering how I could add multiple terrain per a scene.

     

    I have a map that I'd like to implmenet with a vast range of textures.

     

    The heightmap size is 12288x7543.

×
×
  • Create New...