(08-21-2012, 09:53 PM)Dominic0904 Wrote: Ok thanks, that helped. But when do I know when to write them? Say when do I know when to write this next to the function;
(float afAmount, string& asType, bool abSpinHead, bool abLethal)"
Over;
(string &in item)
Or;
(string &in asParent, string &in asChild, int alState)
That's the only thing that is really confusing me.
It depends entirely on what is triggering the function.
For example, if what triggers the function is AddEntityCollideCallback (you walk into an area), then you should write
(string &in asParent, string &in asChild, int alState) as strings and ints you can use later.
void COLLIDE(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(3.0f,asParent,true,true);
}
The only usage for the long
(string &in asParent, string &in asChild, int alState) is to later be able to reference to what actually went into the collide, or was gone into (asParent being the Player most often).
Sorry, a little rushed here.