Ttt credit adjust: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{this is a|point|name=ttt_credit_adjust|game=Garry's Mod}} It controls map logic to give or take credits away from a Detective or Traitor player. When activated, it tries to...") |
m (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.) |
||
Line 1: | Line 1: | ||
{{this is a|point|name=ttt_credit_adjust|game=Garry's Mod}} It controls map logic to give or take credits away from a Detective or Traitor player. When activated, it tries to remove (or give) the specified number of credits from the !activator. | {{this is a|point entity|name=ttt_credit_adjust|game=Garry's Mod}} It controls map logic to give or take credits away from a Detective or Traitor player. When activated, it tries to remove (or give) the specified number of credits from the !activator. | ||
A practical example of this entity is to have a Traitor room door that will only open if the activator spends 1 credit. This would be done by having a ttt_traitor_button with logic as follows. | A practical example of this entity is to have a Traitor room door that will only open if the activator spends 1 credit. This would be done by having a ttt_traitor_button with logic as follows. |
Revision as of 21:25, 17 May 2024
ttt_credit_adjust
is a point entity available in Garry's Mod. It controls map logic to give or take credits away from a Detective or Traitor player. When activated, it tries to remove (or give) the specified number of credits from the !activator.
A practical example of this entity is to have a Traitor room door that will only open if the activator spends 1 credit. This would be done by having a ttt_traitor_button with logic as follows.
Keyvalues
- Credits ([todo internal name (i)]) <integer>
- The amount of credits to take. This can be set to a negative value to give the !activator credits.
Inputs
- TakeCredits
- Attempts to take the number of credits specified in this entity from the !activator. If the player does not have sufficient credits, the OnFail output is fired. Otherwise, OnSuccess is fired. Obviously when giving credits it never fails.
Outputs
- OnSuccess
- Fired in response to TakeCredits input if the activator player has successfully received or paid the credits.
- OnFail
- Fired in response to TakeCredits input if the activator player did not have sufficient credits.