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!
Theforgot3n1 Offline
Member

Posts: 192
Threads: 20
Joined: Apr 2012
Reputation: 6
#7
RE: GivePlayerDamage help and some explanation please!

(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.

Confusion: a Custom Story - Ch1 for play!
http://www.frictionalgames.com/forum/thread-15477.html
About 50% built.
Delayed for now though!
08-22-2012, 07:06 AM
Website Find


Messages In This Thread
RE: GivePlayerDamage help and some explanation please! - by Theforgot3n1 - 08-22-2012, 07:06 AM



Users browsing this thread: 1 Guest(s)