[NFP] Newb question about learning the parameters of a function that is added to an event

DeckerdJames

Warlord
Joined
Nov 1, 2019
Messages
235
I have seen this function "OnCombatVisBegin" in a lua file and the parameter "combatMembers" is used like an array. What is "combatMembers"? A table?
Examples:

Code:
function OnCombatVisBegin(combatMembers)

{

    example: uses combatMembers[x] in the body of the function

}

Events.CombatVisBegin.Add( OnCombatVisBegin );


------------------------------------------------------------------------
If I wanted to know how to write a OnUnitMoved function correctly, how do I learn what the parameters are?

Code:
OnUnitMoved(what parameters?)

{

      what parameters are available and how do I know their type? Are they all tables or can they be any type?

}

Events.UnitMoved.Add(OnUnitMoved);


---------------------------------------------------------------

Any help is appreciated or if anyone knows where to find a resource that lists the full declarations of these functions, that would be great! I think that if I can get these declarations, I can pretty much write any kind of mod I want.

---------------------------------------
Well, I found some of the answers just moments after asking this question


If anyone knows of another resource, that would also be great!
 
Last edited:
Top Bottom