Jump to content

Leadwerks Extended Executable Template


reepblue
 Share

Recommended Posts

In App.cpp, I think it would be a good idea to create globals in lua for window, world and context. Not having these globals breaks any script that uses them which is very possible since these global variables are available in the stock Main.lua and also in LEX Main.lua when in sandbox mode. A work around is to adding a few lines in the LEX Main.lua but I think the right change is modifying App.cpp.

 

app = App:Create(title, backgroundmap)
app:SetStartMap(startmap)
world=World:GetCurrent()
window=Window:GetCurrent()
context=Context:GetCurrent()

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

Thanks man, If your interested in the newer project, please take a look at this blog. In the next version, I'll probably not be releasing a lot of scripts and such so the engine can continue to update without conflicts.

 

Glad it helps. :)

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

2) Something is off with the loading of the maps, in the editor I could load a map just fine but if the game is published as soon as the "Changemap" script is called the game crashed without any warnings.

 

 

I have the same problem here.

 

I created a new project with LEX template and moved my files from the old project to the new one.

 

I have a script to change maps and now I am getting the follow error:

 

Failed to read file "F:/Development/Leadwerks/Projects/LogRiders/start2".

 

I tried with changemapname=self.mapname and the new LoadMap(self.mapname) from LEX

 

I can play the map if a load in the editor.

 

[EDIT]

Also, when in no sandbox mode I use:

window:KeyDown(Key.N)

 

I get: attempt to index global 'window' (a nil value)

 

Tried to press F11 on an empty project made with the template and nothing shows up.

 

[EDIT2]

About the map change, for some reason he is not looking for the maps in the /Maps folder when you try to change maps. I have to put something like "Maps/start3.map" to work.

 

Thanks in advance smile.png

My Leadwerks games!

https://ragingmages.itch.io/

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