The Daily Click ::. Downloads ::. Engine ::. Muz's 360 degrees MMF2-Lua shooting engine

Muz's 360 degrees MMF2-Lua shooting engine
Author: Muz Submitted: 25th April, 2009 Favourites:0
Genre: Engine Downloads: 320

Edited By Muz on 4/25/2009

OK, I lied. It's not 360 degrees. It's 2 pi. Which is a lot more than 360 degrees Basically, you click, and it shoots. But you get a lot more directions than the standard 32. And it's simple.

Also, it uses Lua, so it's a very simple way to learn how to incorporate Lua into your MMF game, which gives you much more control in the long run. I'd suggest you open the Lua script file in Notepad++. Easier to read all the messy comments

EDIT: Version 1.1
- Now includes inaccuracy code and better commented
- Also includes random generation of numbers in Lua-MMF2

Review This Download (25.1kb )

Posted by OMC 25th April, 2009

It not be working for me.

2 Pi? O_o Isn't that 6.283?
Posted by Sketchy 25th April, 2009

Seems like a very complicated way to do something very simple, but as an example to help people learn Lua, I guess it's good.
Still way far over my head though.

So far I haven't seen Lua used to do anything that couldn't have been done (more easily) without. I'm sure it must have it's uses, so I'd really like to see an example of that.

And yes, MMF2 *does* have the ATan2 function now
Posted by UrbanMonk 25th April, 2009

2π is the radian measurement for 360 so it's basically the same thing.
Posted by Muz 26th April, 2009

OMC: What do you mean it doesn't work?
Hehe, radians are like the metric equivalent for degrees. Much cooler ..but ugly

Sketchy: Lua makes that long inaccuracy code much easier to type in. I dare you to type in the same formula in MMF2 without E++. Nightmare, man.

Yeah, its use is when you want to add more on top of this code. I made this base more in Lua than I needed to just to show some basic stuff you could do with it. Also, it was a lot faster to code and edit.
Posted by Sketchy 26th April, 2009

It's not *that* long - you could basically just type the same thing into notepad, and then use "replace" a few times, to make it "MMF friendly" (that's what I do when making really complicated expressions).

My BulletWidget was only about 10 lines, and had inaccuracy, gravity, bullet rotation etc.

I guess if you can program already, it would be quite easy to pick up, but for non-programmers I haven't seen anything to suggest it's worth learning.

It would just be cool to see it used to it's full potential somehow, and then maybe I'd change my mind.
Comment edited by Sketchy on 4/26/2009
Posted by OMC 26th April, 2009

I'm not getting any shootage. Something I'm doing wrong maybe?
Posted by Muz 27th April, 2009

OMC: Are you getting movement? Did you extract everything into a folder? It takes it from an external file





Worth A Click