Step 1: Understanding heat engines.
A heat engine operates by converting heat energy into mechanical energy, which is typically used to perform work. This is the primary function of most engines, such as internal combustion engines in vehicles.
Step 2: Analysis of options.
- (1) Chemical energy: Incorrect. Heat engines do not convert heat into chemical energy directly.
- (2) Mechanical energy: Correct. Heat energy is primarily converted into mechanical energy in heat engines.
- (3) Kinetic energy: Incorrect. While some mechanical energy may be converted into kinetic energy, heat engines generally convert heat into mechanical energy first.
- (4) Potential energy: Incorrect. Heat engines do not directly convert heat into potential energy.
Step 3: Conclusion.
Thus, the correct answer is (2) Mechanical energy.
Final Answer:
\[
\boxed{2. Mechanical energy}
\]