Mission script questions.

Mission script questions.

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Mission script questions.

Post 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!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

soo... umm no answers...?
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post 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.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post 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.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post 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.
Post Reply

Return to “Lua Scripts”