Func buyzone: Difference between revisions
Jump to navigation
Jump to search

Tip: The
Note: Setting this entity's team to -1 and
Note: This keyvalue is only used when this entity is spawned, so changing it with AddOutput has no effect.
The actual keyvalue that determines the buy team is
(updates) |
(Corrected TeamNums, added SetTeam input, tested that touch-specific I/O doesn't work properly, found mistake in csgo.fgd (SetEnabled -> Enable).) |
||
Line 1: | Line 1: | ||
{{lang|Func buyzone}} | {{lang|Func buyzone}} | ||
{{base brush multi|func_buyzone|game1=Counter-Strike: Source|game2=Counter-Strike: Global Offensive}} | [[Image:Csgobuyzones.jpg|thumb|500px|Buyzones usually touch all player spawns of an entire team.]] | ||
{{base brush multi|func_buyzone|game1=Counter-Strike: Source|game2=Counter-Strike: Global Offensive}} | |||
{{code class|CBuyZone|func_buy_zone.cpp}} | {{code class|CBuyZone|func_buy_zone.cpp}} | ||
==Entity Description== | |||
It is used to define areas where [[player]]s of different teams can open the buy menu to purchase weapons and equipment. | |||
If a [[player]] touches the volume of this entity and his team equals the team of this entity, then he is allowed to buy. {{csgo}} If this entity has the team 0 or -1, then any or no player can buy inside this entity's volume, respectively. | |||
{{Tip | The <code>SetTeam</code> input can be used to change the buying team in-game.}} | |||
{{Note | Setting this entity's team to -1 and <code>Disable</code>ing it have the same effect, just that these are independent operations.}} | |||
{{Bug | The "touch-specific" [[I/O]] of this entity (<code>OnStartTouch</code>, <code>OnTouching</code>, ...) does not work properly, the buyzone's volume seems not to be considered. Make a different entity to use these.}} | |||
{{Bug | {{csgo}} By default, this entity has the inputs <code>SetEnabled/SetDisabled</code> in [[Hammer]], but it actually doesn't; Using these has no effect! Use <code>Enable/Disable/Toggle</code>. This can be fixed by editing in {{ent|csgo.fgd}}, searching for <code>func_buyzone</code>. (That's 8 characters to delete.)}} | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Team number (int | {{KV|Team number (int)|int|intn=TeamNum|The team that can use the buyzone.}} | ||
:{| class= | :{| class="wikitable" | ||
| -1 || {{csgo}} No one | |||
| -1 || | |||
|- | |- | ||
| 0 || | | 0 || {{csgo}} Everyone | ||
|- | |- | ||
| | | 2 || Terrorists | ||
|- | |- | ||
| | | 3 || Counter-Terrorists | ||
|- | |- | ||
| | | ''other'' || No one | ||
|} | |} | ||
{{Note | This keyvalue is only used when this entity is spawned, so changing it with {{ent|AddOutput}} has no effect. {{csgo}} The actual keyvalue that determines the buy team is <code>teamnumber</code>.}} | |||
{{KV BaseTrigger}} | {{KV BaseTrigger}} | ||
{{KV BaseEntity|brush=1}} | {{KV BaseEntity|brush=1}} | ||
==Inputs== | ==Inputs== | ||
{{IO|SetTeam_TerroristOnly| | {{IO|SetTeam|param=int|Sets the team of this entity, which also sets the team that is allowed to buy.}} | ||
{{IO|SetTeam_CTOnly| | {{IO|SetTeam_TerroristOnly|only=CSGO|Restrict buyzone to Terrorists only. Equivalent to <code>SetTeam 2</code>.}} | ||
{{IO|SetTeam_AllTeams| | {{IO|SetTeam_CTOnly|only=CSGO|Restrict buyzone to Counter-Terrorists only. Equivalent to <code>SetTeam 3</code>.}} | ||
{{IO|SetTeam_None| | {{IO|SetTeam_AllTeams|only=CSGO|Allows all teams to use the buyzone. Equivalent to <code>SetTeam 0</code>.}} | ||
{{IO|SetTeam_None|only=CSGO|Allows no team to use the buyzone, effectively disabling it. Equivalent to <code>SetTeam -1</code>.}} | |||
{{I BaseTrigger|notf2=1}} | {{I BaseTrigger|notf2=1}} | ||
{{I BaseEntity}} | {{I BaseEntity}} |
Revision as of 15:57, 27 August 2021


Entity Description
It is used to define areas where players of different teams can open the buy menu to purchase weapons and equipment.
If a player touches the volume of this entity and his team equals the team of this entity, then he is allowed to buy. If this entity has the team 0 or -1, then any or no player can buy inside this entity's volume, respectively.

SetTeam
input can be used to change the buying team in-game.
Disable
ing it have the same effect, just that these are independent operations.Keyvalues
- Team number (int) (TeamNum) <integer>
- The team that can use the buyzone.


teamnumber
.
|
Inputs
- SetTeam <integer >
- Sets the team of this entity, which also sets the team that is allowed to buy.
- SetTeam_None (only in
)
- Allows no team to use the buyzone, effectively disabling it. Equivalent to
SetTeam -1
.
|
Outputs
|