FightingGandhi
Chieftain
- Joined
- Dec 21, 2013
- Messages
- 8
I'm writing my first lua script and I'm having trouble getting my function to be called, here is my code.
"Loading: BarbCaptureCity" is being printed in firetuner; however, "function called never prints after combat, is there something I am not understanding about this event?
I did set "VFS: true" if that makes any difference, I don't fully understand the VFS so I may be making a mistake here, but I think it's used in this and most situations.
Edit:
I'm still curious what the answer is here and why this function isn't being called. But I have found a function much better for what I'm trying to do SerialEventCitySetDamage.
Code:
print("Loading: BarbCaptureCity script");
Events.EndCombatSim.Add(
function(attackingPlayer, attackingUnit, attackingUnitDamage, attackingUnitFinalDamage, attackingUnitMaxHitPoints, defendingPlayer, defendingUnit, defendingUnitDamage, defendingUnitFinalDamage, defendingUnitMaxHitPoints)
print("function called");
end
)
"Loading: BarbCaptureCity" is being printed in firetuner; however, "function called never prints after combat, is there something I am not understanding about this event?
I did set "VFS: true" if that makes any difference, I don't fully understand the VFS so I may be making a mistake here, but I think it's used in this and most situations.
Edit:
I'm still curious what the answer is here and why this function isn't being called. But I have found a function much better for what I'm trying to do SerialEventCitySetDamage.