Bismuth
Chieftain
- Joined
- May 20, 2016
- Messages
- 9
I'm working on a mod leader and civ, and I've hit a roadblock where I am not able to figure out the lua needed for the traits.
The most critical problem I am having is that I cannot figure out how to properly refer to units. I have two functions I can't get working because I am stuck on this. In one function (Air-Raid part of Dice Game) I need to go through all of the player's units and damage them.
In another function (MagMassII) I need to check for the deletion of a unit I added then check through all units in the game and kill all full health units. I can't get the check part of this working, so I haven't tried anything for the latter.
I would appreciate any help with referring to units.
Another question I had is if it is possible to use lua to display a message in the same way as combat information or foreign intel? (Examples: "Our warrior(10 damage) defeated a barbarian warrior(15 damage)" or "Rumor has it China is now a Merchant Republic") This is important since my civ has random events each turn, and I would like the player to be notified of which event occurred.
And the last question I had is if it is possible to use lua to initiate anarchy for a player. This is not particularly important, but if it is possible I wanted to use it for one of my civ's random events.
I've attached my work-in-progress script files.
The most critical problem I am having is that I cannot figure out how to properly refer to units. I have two functions I can't get working because I am stuck on this. In one function (Air-Raid part of Dice Game) I need to go through all of the player's units and damage them.
In another function (MagMassII) I need to check for the deletion of a unit I added then check through all units in the game and kill all full health units. I can't get the check part of this working, so I haven't tried anything for the latter.
I would appreciate any help with referring to units.
Another question I had is if it is possible to use lua to display a message in the same way as combat information or foreign intel? (Examples: "Our warrior(10 damage) defeated a barbarian warrior(15 damage)" or "Rumor has it China is now a Merchant Republic") This is important since my civ has random events each turn, and I would like the player to be notified of which event occurred.
And the last question I had is if it is possible to use lua to initiate anarchy for a player. This is not particularly important, but if it is possible I wanted to use it for one of my civ's random events.
I've attached my work-in-progress script files.