|
Puzzle-pieces are collected by the player, and essentially function
as `keys' (keys are indeed implemented as puzzle-pieces), via the
fields puzzle_piece1..4 of many of triggerable entities such
as doors, etc. Puzzle pieces that have been put into their
assigned positions, such as the elements in the Meso-Americal
hub, are represented by puzzle static
pieces. You can get the effect of, say, converting sand
into a piece of glass by using one puzzle-piece to spawn
the creation of another, by means of the targetname field
and the SPAWN spawnflag, as discussed below.
Like other point entities, puzzle pieces can also
trigger events and toggle lights when acquired; this works in original
H2 but wasn't actually used by Raven until Portal of Praevus
However, note the following warning from Terata:
|
In a coop [what about deathmatch?] game, the
puzzle piece stays there when a player picks it up, so the next player
can have it. This means that if you give the puzzle_piece a target, it
won't activate in a coop game because it never gets "picked up."
| |
To make your own custom puzzle piece, you need a model (.mdl) which goes
into the models/puzzle subdirectory of your project, whose name (without
the .mdl extension) is the value of the puzzle_id field, and a
graphic lump with the same name and extension .lmp, which goes into
the gfx/puzzle subdirectory of your project (go the the
chopshop's
Hexen 2 editing section to find out how to make these things).
As a short-term expedient for the graphic, you can just extract one from
the H2 .pak files and rename it. I haven't yet learned how to make
a custom puzzle-piece bob and rotate.
| |