ScarPunk Posted July 18, 2018 Posted July 18, 2018 Hello every one ! Today i wanted to add c++ code to object but looks to accept only lua script ?♂️ It is possible to add c++ into this box Or we just use c++ into app.cpp (add class but every thing is connected to the app file) ? Quote ART CODE SOUND
GorzenDev Posted July 19, 2018 Posted July 19, 2018 like spiderpig said only lua is accepted in that box. But....... The c++ Actor class is what your looking for. 2 Quote
reepblue Posted July 19, 2018 Posted July 19, 2018 This should help. Please read code. 1 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted July 20, 2018 Posted July 20, 2018 Actor class: https://www.leadwerks.com/learn?page=Tutorials_CPP_Actors Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Gonan Posted July 20, 2018 Posted July 20, 2018 hi Josh, I can't find any reference to Actor in the API documentation, is this intentional? Quote
Josh Posted July 20, 2018 Posted July 20, 2018 8 minutes ago, Gonan said: hi Josh, I can't find any reference to Actor in the API documentation, is this intentional? Yeah it’s not exactly a regular class because it must have a class of your own derived from it. There is no default functionality. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted July 20, 2018 Posted July 20, 2018 Is this the correct way to use it? //Header.h class CustomActor : public Actor { public: virtual void UpdatePhysics(); }; //CPP.cpp void CustomActor::UpdatePhysics() { //Do Stuff } Quote
Josh Posted July 20, 2018 Posted July 20, 2018 3 minutes ago, SpiderPig said: Is this the correct way to use it? //Header.h class CustomActor : public Actor { public: virtual void UpdatePhysics(); }; //CPP.cpp void CustomActor::UpdatePhysics() { //Do Stuff } Yes 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
xxxDSSxxx Posted July 23, 2018 Posted July 23, 2018 on the page https://www.leadwerks.com/learn?page=Tutorials_CPP_Actors we have: " By default, a new game will include a sample actor class you can modify called "MyActor". The code for this can be found in the "MyActor.h" and MyActor.cpp" files in the "Source" folder in your game directory. " but i do not have any of those files in that directory, i have only : App.cpp, App.h, main.cpp so where can i find them? Quote
reepblue Posted July 23, 2018 Posted July 23, 2018 I'm not sure why that was written there. Those files were never included. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
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.