Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GivePlayerDamage help and some explanation please!
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#8
RE: GivePlayerDamage help and some explanation please!

(08-22-2012, 07:06 AM)Theforgot3n1 Wrote:
(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.
Ok I think I understood most of that, why did you write "asParent" in the GivePlayerDamage function?
08-22-2012, 05:11 PM
Find


Messages In This Thread
RE: GivePlayerDamage help and some explanation please! - by Dominic0904 - 08-22-2012, 05:11 PM



Users browsing this thread: 1 Guest(s)