The Actor class is included as any other Leadwerks class.
C:\Program Files (x86)\Steam\steamapps\common\Leadwerks\Include\Classes\Actor.h
There is already a C++ setup for you when you create a project. Just open \Projects\Windows\"projectname".sln in Visual Studio and there you go
Just a little note.
if self.health >= self.maxHealth then
self.health = self.maxHealth
end
if self.health <= 0 then
self.health = 0
end
could be replaced with
self.health = Math:Clamp(self.health, 0, self.MaxHealth)
Updating to VS 2017 goes fine according to your instructions. Josh, now when you are at it, could you make the changes suggested below to get rid of warnings. A good project should compile without warning!
Release cl : Command line warning D9030: '/Gm' is incompatible with multiprocessing; ignoring /MP switch
Remove <MinimalRebuild>true</MinimalRebuild> from <CLCompile> section
------------------------------------- LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance
Add <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> to <LINK> section
-------------------------------------
Debug Working Directory is wrong.
Change $(SolutionDir)\..\..\.. to $(SolutionDir)..\..
------------------------------------- Debug 1>libcryptoMT.lib(aes_cbc.obj) : warning LNK4099: PDB 'ossl_static.pdb' was not found with 'libcryptoMT.lib(aes_cbc.obj)' ....
1>libcryptoMT.lib(aes_core.obj) : warning LNK4099: PDB 'ossl_static.pdb' was not found with 'libcryptoMT.lib(aes_core.obj)'....
...
...
etc ...
etc ...
Add /ignore:4099 to <LINK> section, line <AdditionalOptions>
-------------------------------------
Debug Working Directory is wrong.
Change $(SolutionDir)\..\..\.. to $(SolutionDir)..\..
-------------------------------------
Thanks
Thanks for checking macklebee. Then it must be something local here. I created a blank project and added just that model and material. Placing the 'key' model in the scene works. As soon as I click on in the editor crashes. Oh well... I will reinstall Leadwerks then.
Looks great
This one could be even more simple
for each( auto entity in list )
{
entity->SetPosition(1,2,3);
}
instead of
for (auto it = list.begin(); it!= list.end(); it++)
{
auto entity = *it;
entity->SetPosition(1,2,3);
}
I'm going away for a roadtrip tomorrow and won't be back for three weeks. First thing when I'm back is to finish the LCS design editor and then start making some docs and tutorials. After that we will need some beta testers (you have already showed an interest in that). Anyone else is welcome. Will probably be in end of August if God and Thor is on our side. All this will be free when released.