Jump to content

Recommended Posts

Posted (edited)

Hey guys,

 

is it possible to render and load things such as the water when the scene starts? (so when you enter the water it will not freeze for a sec)

or just to make it for the player more easy and faster to load?

 

Cheers!

 

I made something myself but it isn't working. what it has to do is: save the current location of the player.

 

This is the code:

 

if KeyHit(KEY_LALT)==1 then
		DrawText("Saved position")
		Print("Saved to: save.lua")
		function savegame()
			SaveFile = io.open("abstract::save.lua","W")
			if SaveFile == nil then
				Notify("No settings file found")
			end

			SaveFile:write("fw.main.camera:Movef(".."fw.main.camera:SetPosition(fw.main.camera:GetPosition()))".."\n")
			SaveFile:close()
		end

end

Edited by dennis
Posted

You could load the water material files using LoadMaterial while you show the loading screen.

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 ■

Posted

You could load the water material files using LoadMaterial while you show the loading screen.

 

were do I need to place that code ? between, the:

 

While KeyHit(KEY_ESCAPE)==0 do
LoadMaterial("abstract::water.mat")

end

 

or before that after the:

 

LoadScene("abstract::scenename.sbx")
LoadMaterial("abstract::water.mat")

?

Posted

Before the main loop, and before the LoadScene, where you display some loading screen with DrawImage.

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 ■

Posted

Before the main loop, and before the LoadScene, where you display some loading screen with DrawImage.

thanks,

 

I made My load thing. but the problem is that after loading my scene won't start

the scripts are here --> script.rar

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.

×
×
  • Create New...