Jump to content

Lua


Azu

Recommended Posts

Will we be able to do something with the SAMs? I want to try to make something like an UAV in BF2.

Shit, I mean the artillery things. You know. You pick a spot that and the SAMs would shot rocket. Expect, it would fall in a defined location or something.

luatt4.png

Oh, I made the. You can use it if you want.

Link to comment

There's hundreds of functions you can use to "mimic" a lot of things, especially like shooting rockets out of SAM sites, but there isn't any control over them yet, but there may be before the first or a future release though, so its pretty pointless asking that sort of question now.

Link to comment

Not sure if this could be applied to MTA , however , I have a dc hub running with lua-scripts support.

Ptokax it's called.

Although I'm thinking it's might be a great tool to use for testing scripts and generaly just running scripts without having to compile them first.

heres the linkage . http://www.ptokax.org/

Link to comment
  • MTA Team

What happens with scripting like Lua or PHP is that it reads out the function that is called and then compiles it at runtime. It does not compile the entire script with all it's subscripts.

Now compiling at runtime can take longer but since you do not always need every single function available the total time wasted on compiling could be less then compiling in advance.

It also opens the door for dynamicly changing things. You can edit a script file, rehash it (not every script file needs it, like PHP) and you can see the effect immidiatly.

Link to comment

I would think so. The ships are made up of multiple objects (cargo boxes, things like that). Attaching them together and then making them move (as seen in the video) is possible, unless it isn't possible to modify pre-existing map objects.

Link to comment
I would think so. The ships are made up of multiple objects (cargo boxes, things like that). Attaching them together and then making them move (as seen in the video) is possible, unless it isn't possible to modify pre-existing map objects.

I'm pretty sure the pirate ship is a single object.

Moving objects along one of the axes is easy, but rotating them without messing up their relative positions will probably require some math.

Link to comment
I would think so. The ships are made up of multiple objects (cargo boxes, things like that). Attaching them together and then making them move (as seen in the video) is possible, unless it isn't possible to modify pre-existing map objects.

I'm pretty sure the pirate ship is a single object.

Moving objects along one of the axes is easy, but rotating them without messing up their relative positions will probably require some math.

The sails and the boat are two separate objects. I've been working with them in Zmodeler, but that's another topic. I was referring to the container ships and the carrier.

Link to comment
You don't need to learn C++ at all. I learnt Lua just by looking at scripts that people had made, and the wiki documentation that we created.

About that wiki, is it online yet?

I was trying to find out how MTA implemented Lua to learn it better.

I searched your existing wiki, but did not find anything about Lua.

Link to comment
You don't need to learn C++ at all. I learnt Lua just by looking at scripts that people had made, and the wiki documentation that we created.

About that wiki, is it online yet?

I was trying to find out how MTA implemented Lua to learn it better.

I searched your existing wiki, but did not find anything about Lua.

Our documentation is currently incomplete and is therefore private. It will be opened once it is ready - but rest assured it should make scripting much easier for beginners.

Link to comment
Theres a thing that worries me:

In gmod9 there were a few Viruses (Worms and that sh*t) that u could caught on some servers, they were coded with Lua and can execute at ANY TIME.

I hope u have any idea to prevent this.

As long as you don't host a server, it shouldn't be a problem.
Link to comment
  • Recently Browsing   0 members

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