// note: NOT IMPLICITLY DEFINED
local function myFunc(mobj)
// insert contents here
end
// specific object types method:
do
// create a list of object types you want to apply your hook function to
local list = {
MT_OBJECTTYPE1,
MT_OBJECTTYPE2,
MT_OBJECTTYPE3} // etc...
for _,i in ipairs(list) // iterate through list of object types
addHook("hookname", myFunc, i) // i is each object type in the list
end
end
// specific object flags method:
do
for i = 0,#mobjinfo-1 // iterate through object type definitions (#mobjinfo-1 because mobjinfo[#mobjinfo] does not exist in reality)
if mobjinfo[i].flags & MF_ENEMY // is the object type a type of enemy? (for example)
addHook("hookname", myFunc, i) // i is an object type for an enemy (obviously, I hope)
end
end
end