Jump to content

Can we add c++ to objects ?


ScarPunk
 Share

Recommended Posts

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

831746215_Cisforwhat..thumb.PNG.e254eb6a9f7d0820adb68b4f59c6b385.PNG

 

Or we just use c++ into app.cpp (add class but every thing is connected to the app file) ?

 

 

ART

CODE

SOUND

Link to comment
Share on other sites

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.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

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

  • Thanks 1
  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...