Page 1 of 1
One or two questions
Posted: 15 Jun 2007, 10:47
by AF
1) How do you load a groupAI via lua?
2) How would I draw an arbitrary string at a map co-ordinate?
Posted: 15 Jun 2007, 13:04
by trepan
1) How do you load a groupAI via lua?
- Spring.SelectUnitArray()
- Spring.SendCommands({"aiselect Group AI Name"})
or
- Use Spring.SetUnitGroup(unitID, groupID) if a group with the
right GroupAI already exists
2) How would I draw an arbitrary string at a map co-ordinate?
- Spring.AddWorldText('text', posx, posy, posz) -- (attached to selected units)
or
- Use gl calls in DrawWorld() to setup the transformation, and then
draw the text with gl.Text(), and use the lua fontHandler
Posted: 15 Jun 2007, 14:34
by AF
hmm how would I then get rid of that text in order to update it?