Holiday gift: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Langsp}} This entity exsists since 2011.<br> It got added together with the achievement "Valve Gift Grab 2011 - L4D2"<br> It's description is following:<br> "Collect three g...")
 
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Langsp}}
{{LanguageBar}}
This entity exsists since 2011.<br>
{{ent not in fgd|all}}
It got added together with the achievement "Valve Gift Grab 2011 - L4D2"<br>
{{CD|CHolidayGift}}
It's description is following:<br>
{{this is a|model entity|name=holiday_gift|game=Left 4 Dead 2|game1=Day of Defeat: Source|game2=Counter-Strike: Source}}
"Collect three gifts dropped by Special Infected in Versus Mode"<br>
==Overview==
This is actually not quite right. The gifts will actually spawn for killed special infected and killed tanks.<br>
The mentioned entity was [https://store.steampowered.com/oldnews/7024 introduced in December 15, 2011 update] for CS:S, DOD:S, [https://store.steampowered.com/oldnews/7036 aswell as Left 4 Dead 2], in conjunction with the achievement "'''Valve Gift Grab 2011 L4D2'''", "'''Valve Gift Grab 2011 – CS:S'''" and "'''Valve Gift Grab 2011 – DoD:S'''" (the latter two were later renamed to just "'''Gift Grab'''").  
They do not spawn for any common/uncommon infected or the witch.<br>


== Who can collect the gifts? ==
In Left 4 Dead 2, the purpose is to collect three gifts dropped by Special Infected in Versus Mode, while in CS:S and DOD:S, collect three gifts dropped by opponents.
The gifts are only collectable by players in the survivor team.


== Who has to kill the infected to obtain a gift drop? ==
== Features ==
A survivor and an SI/Tank can be the killer.
The gifts spawn for killed special infected and tanks, not for common/uncommon infected or the witch. Only players on the survivor team are able to collect the gifts. Both survivors and Special Infected/Tank can be the killer to obtain a gift drop. Even if the Special Infected/Tank is killed by the world (e.g. Any {{ent|trigger_hurt}} or drowning), it can still trigger a gift drop.
Even when the SI/Tank gets killed by the world (e.g. Any trigger_hurt or drowning) it can trigger a gift drop.


== When do gifts spawn? ==
== Factors affecting gift spawning ==
If a gift will spawn or not depends on some factors.
Several factors determine whether a gift will spawn:
# The Convar: z_holiday_gift_drop_chance 0.3 // That basicly means a chance of 30% ( def. "0.3" ) min. 0.000000 max. 1.000000
# The Convar: z_holiday_gift_drop_chance (default value: 0.3), indicating a 30% chance, with a minimum value of 0 and a maximum value of 1
# The date: 1st of december untill 2nd of January (inclusive)
# The date: Gifts spawn between December 1st and January 2nd (inclusive).
# How much time passed between last last gift has been dropped? (It seems to be around 16 seconds)
# Time interval: A new gift will only spawn after approximately 16 seconds have passed since the last one was dropped.


== How long do they last? ==
== Gift lifespan ==
When they are not collected by any player, (basicly just walking over it) they despawn after 30 seconds.
When a gift is not collected by any player, it will automatically despawn after 30 seconds.
 
== FGD Code ==
{{todo|{{l4d2}} ver}}
Since this entity automatically disappears after 30 seconds if not picked up, it's best used in conjunction with {{ent|point_template}} or [[vscript]].
 
{{expand|title={{css|2}}|
<pre>
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/cs_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []
</pre>}}
{{expand|title={{dods|2}}|
<pre>
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/dod_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []
</pre>}}
{{expand|title={{l4d2|2}}|
<pre>
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/l4d_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []
</pre>}}

Latest revision as of 14:49, 23 October 2025

English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CHolidayGift
CItem
CBaseAnimating
CBaseEntity

holiday_gift is a model entity available in Left 4 Dead 2 Left 4 Dead 2, Day of Defeat: Source Day of Defeat: Source, and Counter-Strike: Source Counter-Strike: Source.

Overview

The mentioned entity was introduced in December 15, 2011 update for CS:S, DOD:S, aswell as Left 4 Dead 2, in conjunction with the achievement "Valve Gift Grab 2011 – L4D2", "Valve Gift Grab 2011 – CS:S" and "Valve Gift Grab 2011 – DoD:S" (the latter two were later renamed to just "Gift Grab").

In Left 4 Dead 2, the purpose is to collect three gifts dropped by Special Infected in Versus Mode, while in CS:S and DOD:S, collect three gifts dropped by opponents.

Features

The gifts spawn for killed special infected and tanks, not for common/uncommon infected or the witch. Only players on the survivor team are able to collect the gifts. Both survivors and Special Infected/Tank can be the killer to obtain a gift drop. Even if the Special Infected/Tank is killed by the world (e.g. Any trigger_hurt or drowning), it can still trigger a gift drop.

Factors affecting gift spawning

Several factors determine whether a gift will spawn:

  1. The Convar: z_holiday_gift_drop_chance (default value: 0.3), indicating a 30% chance, with a minimum value of 0 and a maximum value of 1
  2. The date: Gifts spawn between December 1st and January 2nd (inclusive).
  3. Time interval: A new gift will only spawn after approximately 16 seconds have passed since the last one was dropped.

Gift lifespan

When a gift is not collected by any player, it will automatically despawn after 30 seconds.

FGD Code

Todo: Left 4 Dead 2 ver

Since this entity automatically disappears after 30 seconds if not picked up, it's best used in conjunction with point_template or vscript.

Counter-Strike: Source Counter-Strike: Source
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/cs_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []
Day of Defeat: Source Day of Defeat: Source
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/dod_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []
Left 4 Dead 2 Left 4 Dead 2
@PointClass base(Targetname) size(-32 -32 -32, 32 32 32) studio("models/items/l4d_gift.mdl") = holiday_gift : "A holiday present. Disappears after 30 seconds; spawn with point_template or vscript." []