World items: Difference between revisions
Jump to navigation
Jump to search
Note:Only used in
Half-Life: Source maps
m (Replacing {{base point}} with {{this is a}}. This operation was performed by a bot.) |
SirYodaJedi (talk | contribs) |
||
(31 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{TabsBar|main=world_items}} | ||
{{this is a|point entity|name=world_items}} | {{CD|CWorldItem|file1=item_world.cpp}} | ||
{{Ent not in fgd|nolink=1|because=it is almost useless}} | |||
{{obsolete|replacement=the individual {{mono|item_}} entities, namely {{ent|item_battery}} and {{ent|item_suit}} }} | |||
{{ | {{this is a|point entity|name=world_items}} A leftover from [[GoldSrc]]. This entity spawns a specific item at its [[origin]]. Probably left in so that porting {{hl}} maps to {{hls}} is simpler and doesn't need much changes and is left-over since. | ||
{{ | |||
= | {{note|Only used in {{hls|2}} maps | ||
{{ | :{{expand|title=Locations| | ||
::c1a0d - 1x battery (see position by using {{cmd|drawcross|-3316 1478 -250}}) | |||
::c1a1a - 2x battery (<code>drawcross 600 2196 -816</code>) | |||
::c1a2a - 1x battery (<code>drawcross 330 -348 -220</code>) | |||
::c1a2c - 2x battery (<code>drawcross -1200 -1290 -205; drawcross -1692 -1692 -130</code>) | |||
::c2a5 - 1x battery (<code>drawcross -280 -1064 -1214</code>) | |||
::c2a5b - 1x battery (<code>drawcross 784 -1176 90</code>) | |||
::c3a2d - 3x suit (<code>drawcross 1056 -176 -224; drawcross 1184 -176 -224; drawcross 1312 -176 -224</code>) | |||
::t0a0b1 - 5x battery (<code>drawcross 764 776 -80; drawcross 764 744 -80; drawcross 1012 1164 -120; drawcross 752 1388 -120; drawcross 500 1600 -120</code>)}} | |||
}} | |||
== | == Keyvalues == | ||
{{ | {{KV|type|intn=type|integer choices|Type of item to spawn. | ||
{{ | :*44: Battery ({{ent|item_battery}}) | ||
:*45: Suit ({{ent|item_suit}}) | |||
}} | |||
:{{note|To appear, entity from this list must be present in your game.}} | |||
:{{note|The spawned entity inherits this entity's {{mono|[[targetname]]}}, {{mono|target}}, and {{mono|spawnflags}}, and the world_items is subsequently removed.}} | |||
:{{warning|It's removed inside its Spawn function using [https://github.com/ValveSoftware/source-sdk-2013/blob/a62efecf624923d3bacc67b8ee4b7f8a9855abfd/src/game/server/util.cpp#L524-L555 UTIL_RemoveImmediate] which causes a crash if trying to spawn it via {{cmd|ent_create}} or <kbd>SpawnEntityFromTable</kbd> vscript function. <kbd>SpawnEntityGroupFromTable</kbd> can still spawn it and if [[Entity Scripts|entity script]] is provided it won't run the OnPostSpawn hook.}} | |||
== See also == | |||
* {{l4ds}} {{ent|weapon_item_spawn}} | |||
* {{ent|item_dynamic_resupply}} |
Latest revision as of 19:04, 19 May 2025
![]() |
---|
CWorldItem |
![]() |


This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
It has since been deprecated by: the individual item_ entities, namely item_battery and item_suit.
It has since been deprecated by: the individual item_ entities, namely item_battery and item_suit.
world_items
is a point entity available in all Source games. A leftover from GoldSrc. This entity spawns a specific item at its origin. Probably left in so that porting
maps to
is simpler and doesn't need much changes and is left-over since.


Locations - c1a0d - 1x battery (see position by using drawcross -3316 1478 -250)
- c1a1a - 2x battery (
drawcross 600 2196 -816
) - c1a2a - 1x battery (
drawcross 330 -348 -220
) - c1a2c - 2x battery (
drawcross -1200 -1290 -205; drawcross -1692 -1692 -130
) - c2a5 - 1x battery (
drawcross -280 -1064 -1214
) - c2a5b - 1x battery (
drawcross 784 -1176 90
) - c3a2d - 3x suit (
drawcross 1056 -176 -224; drawcross 1184 -176 -224; drawcross 1312 -176 -224
) - t0a0b1 - 5x battery (
drawcross 764 776 -80; drawcross 764 744 -80; drawcross 1012 1164 -120; drawcross 752 1388 -120; drawcross 500 1600 -120
)
Keyvalues
- type (type) <integer choices>
- Type of item to spawn.
- 44: Battery (item_battery)
- 45: Suit (item_suit)
Note:To appear, entity from this list must be present in your game.
Note:The spawned entity inherits this entity's targetname, target, and spawnflags, and the world_items is subsequently removed.
Warning:It's removed inside its Spawn function using UTIL_RemoveImmediate which causes a crash if trying to spawn it via ent_create or SpawnEntityFromTable vscript function. SpawnEntityGroupFromTable can still spawn it and if entity script is provided it won't run the OnPostSpawn hook.