trigger_camera
Last edited 3 months ago2024-08-24 12:38:25 UTC
- Wiki
- View Page
-
You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date.
Click here to see the current revision of this page.
This entity allows you to place moving cameras in your maps that take control away from the player for a time.
Attributes
- Target (target) - The entity that this camera will be looking at.
- Delay before trigger (delay) - Usually the time in seconds before an entity should trigger its target (after being triggered itself). Under other SmartEdit names, delay might also be the time to wait before performing some other action.
- KillTarget (killtarget) - When an entity is triggered, it will remove from the game the entity specified by this property.
- Name (targetname) - Property used to identify entities.
- Hold time (wait) - Time to keep the camera going.
- Path Corner (moveto) - The first path_corner to aim for.
- Initial Speed (speed) - The speed to start at.
- Acceleration units/sec^2 (acceleration)
- Stop Deceleration units/sec^2 (deceleration)
Flags
- Start At Player (1) - Begin with the player's view.
- Follow Player (2) - Use the player as the focal point.
- Freeze Player (4) - Stop the player from moving while camera is in action.
Notes
- The camera can be set up to work in any of several ways - fixed position, with a fixed or moving target (e.g. a security camera), or moving, with a fixed or moving target. Camera sequences can get very complicated.
- A player must be the activator of the camera. It cannot be activated by any entity that doesn't pass a player reference as activator, such as
trigger_auto
or a trigger_relay
. A simple way to do this for cutscenes is to teleport the players around in small black boxes containing a trigger_once
that targets the camera.
- The player must be near the area that the camera is to move in. If not, the game engine will not draw the area properly. You may need to teleport the player into and out of each area.
- In Counter-Strike,
trigger_camera
is also used for the "intro view" aka what you see in the background when you join a server and are choosing a team. Note that this is the outlier as both Half-Life and Deathmatch Classic use info_intermission
.
- A camera must have something to look at, otherwise triggering it won't have any effect. So either the 'target' attribute must be set, or the 'follow player' flag must be enabled.
- Cameras will often start pointing at the direction of
angles
(which defaults to facing due East), then quickly panning towards the target. You may want to do some trigonometry to work out the exact angles and enter the value directly to prevent this, or eyeball it for less dramatic but acceptable panning effect. In J.A.C.K., you can press the [O] key to display some debug info in the 3D view which includes the 3D view's PYR.
- The 'freeze player' flag may appear to completely freeze the player, but in reality it only prevents player movement. The player can still look around, so they may end up facing a different direction when the camera stops. If you want the player to look in a specific direction after a camera stops, consider using a
trigger_teleport
(the pitch/yaw/roll of the teleport destination entity will be applied to the teleported player).
- An active camera can be stopped by triggering it again (or by using a
trigger_relay
to explicitly turn it off).
- When the player's view is released,
trigger_camera
fires its Target. It's usually not a problem if the target is something like info_target
, but it might affect the map logic in other cases, e.g. if camera was looking at the func_train
, it will be toggled after the hold time is expired. It's unknown why it's coded this way, but it's something you should keep in mind.
Team Fortress Classic only
Attributes
- Target (target) - When an entity is activated, it triggers the entity with the name specified by Target.
- Delay before trigger (delay) - Usually the time in seconds before an entity should trigger its target (after being triggered itself). Under other SmartEdit names, delay might also be the time to wait before performing some other action.
- KillTarget (killtarget) - When an entity is triggered, it will remove from the game the entity specified by this property.
- Targetname of teamcheck goal (teamcheck) - Using this in conjunction with an info_tf_teamcheck allows you to switch the entity's team allegiance when the info_tf_teamcheck changes its team setting. The team_no property must be set to Any (0) if you use this value.
- Has item # (items_allowed) - The player must be carrying this item to use this entity. Set 0 to ignore this criterion.
- Has item from group # (h_i_g) - The player must be carrying any item from this group to use this entity. Set 0 to ignore this criterion.
- Hasn't item from group # (hasnt_item_from_group) - To use this entity, the player must not be carrying any item from this group. Set 0 to ignore this criterion.
- If item # has moved (if_item_has_moved) - A player can only use the entity if this item is not in its original spawn location. Set 0 to ignore this criterion.
- If item # hasn't moved (if_item_hasnt_moved) - A player can only use the entity if this item is in its original spawn location. Set 0 to ignore this criterion.
- If goal # active (if_goal_is_active) - Players can only use the entity if this goal is in the active state. Set 0 to ignore this criterion.
- If goal # inactive (if_goal_is_inactive) - Players can only use the entity if this goal is in the inactive state. Set 0 to ignore this criterion.
- If goal # removed (if_goal_is_removed) - Players can only use the entity if this goal is in the removed state. Set 0 to ignore this criterion.
- If group # active (if_group_is_active) - A player can only use the entity if all the goals in this group are in the active state. Set 0 to ignore this criterion.
- If group # inactive (if_group_is_inactive) - A player can only use the entity if all the goals in this group are in the inactive state. Set 0 to ignore this criterion.
- If group # removed (if_group_is_removed) - A player can only use the entity if all the goals in this group are in the removed state. Set 0 to ignore this criterion.
- Name (targetname) (targetname)
- Team allowed to activate entity (team_no)
- Player class allowed to activate entity (playerclass)
- Path Corner (moveto)
- Initial Speed (speed)
- Acceleration units/sec^2 (acceleration)
- Stop Deceleration units/sec^2 (deceleration)
2 Comments
You must log in to post a comment.
You can login or register a new account.
键:effects
值:1
这可以让摄像机周围布满粒子,方便在使用后查看摄像机的当前位置。
You can add a set of key values when debugging a motion camera:
Key: effects
Value: 1
This allows particles to surround the camera, making it easy to see the current position of the camera after use.
https://twhl.info/wiki/page/Entity_Attribute%3A_Entity_Effects
https://twhl.info/wiki/page/Tutorial%3A_Non-coding_workarounds_for_your_mod