Jump to content

[Blog] Scripting revealed


orappa

Recommended Posts

As many of you know, we released a video two days ago showcasing many new features in MTA. If you missed it, here it is:

https://www.youtube.com/watch?v=ytuuYXJje6o

Everything you saw in that video was created using MTA's new scripting system. This is the secret feature we alluded to many months ago. It was actually started before MTA:Race, which gives you an idea of how long we have been working on this. This is not the SDK; the SDK is more powerful but scripting still offers a great deal of flexibility. To put things in perspective, we currently have 373 functions available for developers to use for pretty much anything. The video only showed a few of them, such as object movement, hit detection and camera modification.

All MTA scripts are written in the Lua scripting language. We chose Lua for several reasons, including its simple syntax, extensibility and the fact that Lua scripts do not need to be pre-compiled. Those of you with experience in other languages should pick things up pretty quickly, but I stress that scripting is not necessary in order to make a map. Existing game mode scripts can be imported into new maps with no scripting necessary (more on this at a later date). However, for those of you that do want to code game modes, the QA team has been working hard on providing extensive documentation to aid in this process.

Whilst the video mainly showed tech demos and mini games, the QA team has been working hard on several game modes. Capture the Flag was shown in the video but other modes such as Conquest and Turf Wars are in development. It will be particularly interesting to see what the RPG community will do with the power of the new scripting system. Features useful to RPG programmers include control over time and weather, customisable player stats and clothes, integration with the MTA Center for player authentication (optional), vehicle modifications, 3D sound functions, dimensions, and many more.

One thing from the video that I feel should be explained is the shot where players are moving buildings around with the mouse. This is not the map editor; it is just a demo script. The map editor is still in development, but we will be using the scripting language to create it. If you think back to the map editor in Race, you will appreciate just how powerful the scripting language is to be able to recreate and improve upon it.

Another important feature in the video is glue, which will play a crucial role in the creation of the map editor. Glue is used to attach two objects together so that they move and rotate in unison. This allows players to "stick" to vehicles in order to fire from them without falling off. Gluing is enabled by the scripter and can be triggered any way he chooses - whether by a hotkey, a menu option or standing close to the vehicle for a certain amount of time. We really want to emphasise the flexibility and number of choices given to scripters when creating game modes for MTA:SA.

We will start a new feature on the blog where we show you short videos of scripts and tech demos and explain in detail how the scripter managed to achieve everything in the video. This will give you an idea of what can be achieved with the scripting capabilities, whilst at the same time increasing your familiarity with the language. We would like to hear any suggestions you have for the scripting system on our forum.

We hope that the Christmas video sufficiently whet your appetites and gave you an indication of the amount of work that has gone into the mod, and the direction we are taking it.

On a side note, we are still accepting Race maps to be converted to DM maps for the release. More details here: viewtopic.php?t=18487

Link to comment
What no one has mentioned is that MTA's scripting layer is actually totally separate from the lua interface, which i'm sure only other developers can appreciate at the moment, but it means that we can swap/add support for any other language with ease if we decide to.

It would of been impossible to copy sa-mp's scripting language at the time it was started, because sa-mp didn't even exist.

Link to comment

Where is Titan mode!? This is just a joke but it'd be funny to see like BF2142 a messed up titan mode w/ giant gutted out tanks floating around. Like being able to spawn inside them and have them 3ds'd inside of it so u can blow up its tank shells and take down the tank while running out and parachuting down as you win the game :lol:

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...