Jump to content

ProcessScene.cpp


Dan_Incognito
 Share

Recommended Posts

Guest Red Ocktober

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

Link to comment
Share on other sites

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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 ;)

Games before Dames.

Link to comment
Share on other sites

Guest Red Ocktober

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

Link to comment
Share on other sites

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 :)

Games before Dames.

Link to comment
Share on other sites

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

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

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...