- Joined
- Jan 24, 2011
- Messages
- 4,801
Ok, well, it's not the end of the world I guess to write it like this:
which "splashes" all over the place.
Another thing - you may have mentioned this and sorry if you did - but where would I store the new state files? I want to have a state.BoudiccaKilled where these events won't fire once she's taken out. Since I'm not supposed to modify the actual events file, I'm not totally certain where this belongs (meaning each part - where do I store the initialization, where do I store the onLoad etc).
Spoiler :
Code:
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,4,{0,1,2,3,9}) --This is to enhance replay value - the units will spawn near the battle but not clear exactly where
civ.ui.text("The rash Qunitus Petillius Cerialis, commander of the Legio IX Hispana, has fallen in battle, swept aside by the incredible and swelling forces of the Iceni. Emboldened by their success, more tribesmen flock to the banner!")
civlua.createUnit(object.uIceniSwordsmen, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=8,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,4,{0,1,2,3,9})
civlua.createUnit(object.uIceniNobles, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=4,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,3,{0,1,2,3,9})
civlua.createUnit(object.uIceniSpearmen, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=12,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,3,{0,1,2,3,9})
civlua.createUnit(object.uIceniSkirm, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=2,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,3,{0,1,2,3,9})
civlua.createUnit(object.uIceniSkirm, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=2,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,4,{0,1,2,3,9})
civlua.createUnit(object.uIceniArchers, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=2,randomize=true, veteran=false})
end
if loser.type == object.uCerialis then
local randomTile = gen.getRandomNearbyUnoccupiedTile(loser.location,4,{0,1,2,3,9})
civlua.createUnit(object.uIceniArchers, object.tIceni, {{randomTile.x,randomTile.y,randomTile.z}}, {count=2,randomize=true, veteran=false})
end
which "splashes" all over the place.
Another thing - you may have mentioned this and sorry if you did - but where would I store the new state files? I want to have a state.BoudiccaKilled where these events won't fire once she's taken out. Since I'm not supposed to modify the actual events file, I'm not totally certain where this belongs (meaning each part - where do I store the initialization, where do I store the onLoad etc).