Jump to content

rendering entities and models ?


dennis
 Share

Recommended Posts

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
Link to comment
Share on other sites

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

?

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