Jump to content

LE3 question about starting a project.


gordonramp
 Share

Recommended Posts

Finally exploring Leadwerks 3. I've discovered how to create a project but but when I run the map it always seems to start with the 'Darkness Waits' title and music then shows the scene I have created. I'm not in the Darkness Waits project so where do I either delete or change the title and music? I've looked through lua.start but there's nothing there about loading media.

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Link to comment
Share on other sites

Finally exploring Leadwerks 3. I've discovered how to create a project but but when I run the map it always seems to start with the 'Darkness Waits' title and music then shows the scene I have created. I'm not in the Darkness Waits project so where do I either delete or change the title and music? I've looked through lua.start but there's nothing there about loading media.

 

Hmm when you use the project manager to make a new project it should create a new App.Lua script that shouldn't have anything to do with Darkness Awaits.

 

If you open up the App.Lua script it should look something like this: (except instead of "test2" it should say your project name)


--This function will be called once when the program starts

function App:Start()

 

--Set the application title

self.title="test2"

 

--Create a window

self.window=Window:Create(self.title)

self.window:HideMouse()

 

--Create the graphics context

self.context=Context:Create(self.window,0)

if self.context==nil then return false end

 

--Create a world

self.world=World:Create()

 

--Load a map

local mapfile = System:GetProperty("map","Maps/start.map")

if Map:Load(mapfile)==false then return false end

 

return true

end

--This is our main program loop and will be called continuously until the program ends

function App:Loop()

 

--If window has been closed, end the program

if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end

 

--Update the app timing

Time:Update()

 

--Update the world

self.world:Update()

 

--Render the world

self.world:Render()

 

--Refresh the screen

self.context:Sync()

 

--Returning true tells the main program to keep looping

return true

end

Link to comment
Share on other sites

Quick steps to making a new project:

 

1. Make sure your current LE3 build is up to date (just click on the installer and click update)

 

2. Open the project manager File->Project Manager

 

post-5181-0-28459100-1362456980_thumb.png

 

3. Click "New"

 

post-5181-0-47816700-1362457003_thumb.png

 

4. Select your project type (I chose Lua for this example), enter a project name, and click okay.

 

post-5181-0-47291900-1362457027_thumb.png

 

5. Select your project from the list and click okay

 

6. Create a map, throw in a camera

 

7. Save your map.

 

post-5181-0-75749500-1362457055_thumb.png

 

8. Click run.

Link to comment
Share on other sites

Ok, that explanation solved my problem. Not sure what I had managed to do but it's quite separate from DA. now. It would be useful to have an icon for the camera onscreen. Thanks, back to exploring.

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Link to comment
Share on other sites

Oh, also when the program runs the script editor always appears as well as the render screen. Is it possible to turn it off, ie. just have the render screen appear?

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Link to comment
Share on other sites

The debugger and program output are part of the script editor, so we chose to make it appear when the game is run.

 

Originally I tried to make a separate output and debugger window, but it was confusing.

My job is to make tools you love, with the features you want, and performance you can't live without.

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