Jump to content

What does distributorOfPain do?


Thirsty Panther
 Share

Recommended Posts

I'm inflicting damage the player and I find the "Hurt" script in the fpsplayer script.

The first variable is "Damage" which will reduced the players health by that amount.

The second is called "distributorOfPain". Does anyone know what this does?

 

Also whats the difference between the "Hurt Script" and the "Take Damage Script".

I know that using the "Take Damage Script" doesn't enact the dying script but I don't know why.

If you use the take Damage Script the game continues but the player can no longer move.

Link to comment
Share on other sites

The distributorOfPain variable is used in the monster AI script so it would chase who ever inflicted it damage. I'm assuming it is left the same in the player script, so that its open to change. E.g. If someone introduced multiplayer, where a second player could inflict damage to the first, if the Hurt function is expecting one argument (just damage), but gets two, it will give errors.

 

As for the Take Damage function, I believe it is there for those who want a different behaviour. It calls an output from the node editor so you can link it to something else.

  • Upvote 2
Link to comment
Share on other sites

TakeDamage is a mistake and should not be in there. It doesn't do anything.

 

DistributorOfPain is as explained above, and was an excuse to incorporate Metallica Lyrics into the engine.

 

  • Upvote 2

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...