How can I add a pre-rendered cut-scene / movie in LUA?
such as many people do, the user triggers the zone and the movie plays...
is this even possible ?
cheers
AddCutSceneToGame is really childish. every person know that it's not that simple. I even wasn't asking for
[/font]that kind of command and / or code. and a cutscene isn't always pre-rendered most of the time it's live action. but I want to add a video file (if that's the easy talk for you.)
I hope I was clear enough for you to understand.
cheers
[/font]
How can I add a pre-rendered cut-scene / movie in LUA?
[/quote]
Word for word your original question. No information in the OP about the engine or framework, just a simple How can I add a pre-rendered cut-scene / movie in LUA?. Which is a question that, without additional crucial information, makes no sense.
The thing about Lua is, it's just a language. It only does the basic things you expect a language to do. Expressions, code execution, etc... On it's own, it doesn't do much at all. The intermediate functionality, ie handling files, handling strings, math functions, etc... are all added as external libraries or modules. And anything more advanced than that also has to be added as a module of some sort.
There are 2 basic use cases for Lua: extending via modules that can be loaded via require from the default command-line executable provided with Lua distros, or embedding the Lua scripting environment inside another executable and exposing external engine functionality via binding code. In either case, the only way to add advanced functionality (such as adding and triggering cut-scenes) is through the use of extensive amounts of external code. All the 'guts' of such a system are highly dependent upon the engine, so not including any information on your engine and environment is a good way to get so-called joke responses.
So now that we know some actually relevant info (you're using Leadwerks), then the place to start is the Leadwerks documentation. How would you play a cutscene in Leadwerks without the use of Lua? When you've figured that out, analyze that code and figure out the best way of writing bindings to Lua so that the code can be called from a script. It's not a trivial task, given that a cutscene needs to mesh well with game state, UI, main-loop execution, etc...
I recommend you stow the rage, take some basic primers on binding code to Lua, and browse the Leadwerks documentation to learn how to play video files. Do that, and you'll be able to write your own AddCutSceneToGame module.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more