Explosive Cube: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 27: Line 27:


==Triggering the Cube==
==Triggering the Cube==
Triggering the cube is very simple. Choose what you want to trigger the cube, and create two outputs
Triggering the cube is very simple. Choose what you want to trigger the cube, and create three outputs. For this tutorial, I will make it as though it is triggered by a button:
 
::{| class=standard-table
!  || My Output || Target Entity || Target Input || Parameter || Delay || Only Once
|-
| [[Image:Io11.png]] || OnPressed || exploding_cube || Skin || 1 || 0.00 || No
|-
| [[Image:Io11.png]] || OnPressed || exploding_cube || Break || none || 5.00 || No
|-
| [[Image:I011.png]] || OnPressed || exploding_cube_explosion || Explode || none || 5.00 || No
|-
|}

Revision as of 23:32, 5 January 2014

Creation

This assumes you have a level to put the cube in. First, make sure you have downloaded files, which are needed for creation. If you do not have these files installed, you can continue using a normal cube, but it may mislead the player.

1. Create a prop_physics with the following settings:

Property Name Value
Name explosive_cube
World Model models\explosivebox\metal_box.mdl

2. Create an env_explosion with these settings:

Property Name Value
Name explosive_cube_explosion
Parent explosive_cube

3. Place the env_explosion in the center of the cube.

Once that simple process is completed, the cube is ready.

Triggering the Cube

Triggering the cube is very simple. Choose what you want to trigger the cube, and create three outputs. For this tutorial, I will make it as though it is triggered by a button:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png OnPressed exploding_cube Skin 1 0.00 No
Io11.png OnPressed exploding_cube Break none 5.00 No
File:I011.png OnPressed exploding_cube_explosion Explode none 5.00 No