Page 1 of 1

Mission script questions.

Posted: 31 May 2007, 17:23
by smoth
Since I have begun the process of working with lua by making some gundam missions I now have some questions. I already have a basic one(puts down a base sets units on patrol and orders units around) but I want to do something more then a preset base and enemy to kill, something a bit more interesting.

When will missions be playable online?
What do I have to do for this?
Can I have the mission prompt the user for a faction or grab the user's already chosen faction?
Can I only print messages in the little chatbox?
Can I play sounds?
How do I rotate buildings in lua?
How do I que build orders in lua?
How do I que paths from factories in lua?

Thanks in advance!

Posted: 31 May 2007, 17:47
by knorke
cool :)
the "commanders ends"- warning script makes a flashing text in the middle of the screen, so I guess you can have text anywhere.
and please make use of this, in the NOTA missions its easy to miss the text because the chatbox is spammed with "cant reach destination" blabla.

Posted: 03 Jun 2007, 13:40
by smoth
soo... umm no answers...?

Posted: 03 Jun 2007, 14:28
by quantum
I think you're lumping all the Lua stuff together.

As far as I know, there are three separate things that use Lua:

-Mission scripts,
-LuaUI,
-LuaSim.

The latter affects the synced part of Spring and comprises LuaCob, LuaRules and LuaGaia.

All the things you're asking should be possible, but they will require a LuaUI widget and a LuaRules gadget.

For examples on how to play sounds, look at the chatterbox widget.
For messages and selection boxes, look at the Comm ends warning widget, or use a GUI framework like AlphaSub's or Meltrax's.
For faction selection you can look at trepan's morph gadget.
To queue orders, check out the circle formation formation widget.

Hang out in #lua, it will be easier for us to help you from there.

Posted: 03 Jun 2007, 17:49
by 1v0ry_k1ng
If you make an NTAI profile, then you can bring NTAI in at any point. however, it will only use factories + units that are spawned after it is activated.
same applies to RAI

Posted: 04 Jun 2007, 01:03
by smoth
quantum, I am at my parents house helping them with a few things. These posts are on my dad's compy so I cannot sit in the spring lobby like normal.

I am asking if I can do all of that because I am trying to see where the limit of lua missions is. Even though I will have to use lua gaia to do online missions, I wanted to see what the lua mission is capable of.

Ivory, Ntai requires a current version of NTAI and my learning that. Which compaired to lua is a waste of time as I will need to familiarize myself with lua for my gundam goals. I want to make missions that are AI independant so people need only download a map, gundam and spring.

Posted: 28 Jun 2007, 06:27
by gamer17

Posted: 13 Jul 2007, 20:43
by Neddie
Unless I'm much mistaken, Smoth, you need to load an AI for LUA to handle the units with any intelligence. I was just looking up similar data myself, for similar reasons.