LuaAPI.wiki
changeset 942 cca9e43e9d72
parent 940 8c4a529edddb
child 946 3ca13c637fd0
equal deleted inserted replaced
941:6100c2308a82 942:cca9e43e9d72
   242             -- adds a message saying, e.g. "Hoggy H took 25 points of damage"
   242             -- adds a message saying, e.g. "Hoggy H took 25 points of damage"
   243             AddCaption(GetHogName(gear) .. ' took ' .. damage .. ' points of damage')
   243             AddCaption(GetHogName(gear) .. ' took ' .. damage .. ' points of damage')
   244         end
   244         end
   245     end</code>
   245     end</code>
   246 === <tt>onGearResurrect(gearUid) </tt> ===
   246 === <tt>onGearResurrect(gearUid) </tt> ===
   247 This function is called when a gear is resurrected. CPU Hogs will resurrect if the !GameFlag `gfAISurvival` is enabled. Alternatively, specific gears can have `heResurrectable` set to true via `SetEffect`.
   247 This function is called when a gear is resurrected due to the hog effect `heResurrectable` being set (see `SetEffect`) and/or being an AI hog when the game modifier “AI Survival” (`gfAISurvival`) is active. It is *not* called when a hog was resurrected by the resurrector tool you can use in the game.
   248 
   248 
   249 === <tt>onAmmoStoreInit()</tt> ===
   249 === <tt>onAmmoStoreInit()</tt> ===
   250 This function is called when the game is initialized to request the available ammo and ammo probabilities. Use `SetAmmo` here.
   250 This function is called when the game is initialized to request the available ammo and ammo probabilities. Use `SetAmmo` here.
   251 
   251 
   252 === <tt>onNewAmmoStore(team/clan index, hog index)</tt> ===
   252 === <tt>onNewAmmoStore(team/clan index, hog index)</tt> ===