Hey, i've been working for making a mod for my friend, and i've hit a bit of a stumbling block. I've got a few things down, but im still a rookie and well... yeah. i could use a second over.
What i want to do for this civilization is have a UU that is a Mounted Dragon. The first half of what i want to do isnt a problem (Stronger Bazooka), but the second part is sticking me up bad.
Upon its death, it will drop its Rider, Which is in turn ANOTHER UU for the Civ. Only thing is, im having trouble writing out a 'On Death' condition. Could someone check my work? I would be most applicative!
What i want to do for this civilization is have a UU that is a Mounted Dragon. The first half of what i want to do isnt a problem (Stronger Bazooka), but the second part is sticking me up bad.
Upon its death, it will drop its Rider, Which is in turn ANOTHER UU for the Civ. Only thing is, im having trouble writing out a 'On Death' condition. Could someone check my work? I would be most applicative!
Code:
function DragonFlyz_FreeUnit (PlayerID killer, PlayerID killee, UnitType killeeUnitType)
if PlayerID Killee then
local joshua = GetJoshua()
if joshua then
if killeeUnitType(UNIT_DRAGON_FLYZ_DRAGONMOUNT)
player:AddFreeUnit(GameInfoTypes["UNIT_DRAGON_FLYZ_DRAGONRIDER], UNITAI_ATTACK )
end
end
end