1) How do you load a groupAI via lua?
2) How would I draw an arbitrary string at a map co-ordinate?
One or two questions
Moderator: Moderators
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
- 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