Hi folks,
There is something which I would like to understand (at least try to). I have 2 Questions.
==================================== Q 1
I made somthing simple but it doesn't work, so I just want to know what I am doing wrong.
So, I created my Test Hero in 2.01 and want to give him Upgrades with Script.
;hero.ini
Behavior = AIUpdateInterface ModuleTag_03
AutoAcquireEnemiesWhenIdle = Yes ATTACK_BUILDINGS
MoodAttackCheckRate = 500
AILuaEventsList = TestHeroFunctions
End
Scripts I took from Data1.big.
;scriptevents.xml
<EventList Name="TestHeroFunctions" Inherit="BaseScriptFunctions">
<EventHandler EventName="OnCreated" ScriptFunctionName="GainUpg" DebugSingleStep="false"/>
</EventList>
;scripts.lua
function GainUpg(self)
ObjectGrantUpgrade( self, "Upgrade_TestBuilding" )
end
So, this doesn't work and my hero didn't get Upgrade_TestBuilding, any ability, weapon Upg / armor or attribut which I connect with this upg doesn't trigger. Ofc, if this upg I put in his experiance.level or buy upg, thigs are working, but I don't understand why Script stuff doesn't working.
===========================================================================================================
==================================== Q 2
is Inherit="BaseScriptFunctions" matters ? I mean there are others like InfantryFunctions, CavalryFunctions, GondorCavalryFunctions...
Does anyone know What is the difference between theses stuff ? How to use I mean at what condition ? Does anyone have any list of this Inherit names or know where I can find it ?
============================================================================================================
Thanks in advance