Dan_Incognito Posted June 21, 2011 Share Posted June 21, 2011 Hi guys, I was wondering would anyone be able to provide me with the ProcessScene.cpp? Tanx Quote Games before Dames. Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 21, 2011 Share Posted June 21, 2011 if you're using the later versions of Leadwerks, you really don't need it anymore... loadscene pretty much invokes most of the objects' lua scripts... some you will need to manually take care of though (waterplane for example)... and the particle emitters (?)... anywho... if you really need it, download version 2.31 (don't overwrite your latest and greatest... be sure to specify a different target folder)... i think it's in the CPP folder... --Mike Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2011 Share Posted June 21, 2011 You can copy ProcessScene from gamelib also. It does a bit more than the bare LoadScene, for example it cleans up the invisible placeholder models of lights and other stuff which Editor creates, and loads additional stuff from the sbx file which LoadScene doesn't. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 21, 2011 Author Share Posted June 21, 2011 Tanx for the reply Ye when i load the scene most of it seems ok its the water thats off hence why i thought i may need ProcessScene.cpp. so how can i process the water? sorry im still pretty new to LE, i tend to try not to ask questions to much as i want to learn and not waste anyones time on the fourm Quote Games before Dames. Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 21, 2011 Share Posted June 21, 2011 just add the following after loadscene()... SetWater(1); // enables the water... the rest are just some of the adjustments you'd make in the editor properties dialog SetWaterHeight(15); SetWaterSoftness(4); SetWaterColor(Vec4(0.6,0.73,0.84,0.94),Vec4(0.3,0.43,0.54,0.94)); SetWaterVisibility(0,66); SetWaterAmplitude(4); SetWaterWaveSpeed(4); SetReflectionElements(ENTITY_RENDERABLE); --Mike Quote Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 21, 2011 Author Share Posted June 21, 2011 Thank you I really appreciate the help Quote Games before Dames. Link to comment Share on other sites More sharing options...
Guest Red Ocktober Posted June 21, 2011 Share Posted June 21, 2011 no problemo... you'll everyone around here will be more than glad to help out... go here for more on water...the wiki water page good luck... --Mike Quote Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 21, 2011 Author Share Posted June 21, 2011 Tanx Just one other thing while im on here, i want to do my npc's AI in lua but im using c++ for the project so can i use both lua and c++ and bind them or would you suggest something else? Tanx Quote Games before Dames. Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2011 Share Posted June 21, 2011 You can do the AI in C++ (or Fortran ), and read/write control information from the Lua model scripts using GetEntityKey/SetEntityKey. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 22, 2011 Share Posted June 22, 2011 I think you could send and receive messages between the two languages also. Quote Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 22, 2011 Author Share Posted June 22, 2011 Ok cool tanx for the replys again guys I have a few books on AI in c++ for games but are there any good tutorials out there for the likes of doing enemy ai and other npc stuff? iv done a few searches and havnt really found much. Tanx again in advance for the help i really appreciate it Quote Games before Dames. Link to comment Share on other sites More sharing options...
Canardia Posted June 22, 2011 Share Posted June 22, 2011 I would look on google for grid navigation, I think it's somekind of modern way to do pathfinding AI. This might be useful: http://www.vbforums.com/showthread.php?t=566060 Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 22, 2011 Author Share Posted June 22, 2011 Tanx I have it so my npc's can walk around the world but what i cant seem to get my head around is how to make them attack the player and to take damage and die when i shoot them :/ Quote Games before Dames. Link to comment Share on other sites More sharing options...
Canardia Posted June 22, 2011 Share Posted June 22, 2011 You can use EntityVisible(enemy,player) and if it returns 1, then the enemy can see the player, and then he can shoot. You can see the tutorial for this, I think it was called the RayCasting Tutorial. Then you can have a hitpoints counter for the enemy and player, which is first like 100, and each shot reduces the hitpoints by 50, or a headshot sets the hitpoints to 0 at once. And then you can check if player.hitpoints<=0 or enemy.hitpoints<=0 then they die. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Dan_Incognito Posted June 22, 2011 Author Share Posted June 22, 2011 Tanx alot Im going to read up a bit more now on AI and try out a few scripts, Tanx again to everyone who replied i really appreciate the help Quote Games before Dames. Link to comment Share on other sites More sharing options...
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.