This tutorial will teach you to create whiteboards that can be drawn on for Half Life: Alyx mods.
Prefab Download: Whiteboard (v1.0) This includes all the necessary pieces to have a functioning whiteboard, along with several pens which you can edit. Please open the readme.txt
This requires you to have a hlvr.fgd that has the following entities, these can be found on the repo https://github.com/gvarados1/Half-Life-Alyx-FGD
Create a brush the size you would like the whiteboard to be, in my example I am using 25 wide, 50 high and 0.25 deep. Next press Ctrl + T with the brush selected to bind it to an entity, and set the type to func_dry_erase_board.
Whilst still on the brush, apply the texture models/props/alyx_hideout/materials/whiteboard_markable.vmat. You can use the Fast Texture Tool to align the front texture as necessary.
Next, create an info_particle_system, give it a name in my example, its drawing_particle. Make sure the Start Active? is enabled, it should be by default.
Optional - if you would like to load a pre-existing drawing created by Valve, on the Particle System Name, click on the magnifying glass and use the search term “Dry”, this will show several drawings you can use, such as dry_erase_stamp_refuge_glass_01.vpcf. If you do use an existing texture I recommend moving the info_particle_system outside of your map as it will be visible to the user.
Note: Currently no one has found a way of creating a particle system with a prebuilt texture to load in custom drawings, but it is possible so perhaps you can figure it out and update the wiki!
Go back to your func_dry_erase_board and under the Stamp Name property, give it the name you just defined for your info_particle_system, for me it’s drawing_particle.
Now the fun, here you will create a pen marker that is used to draw on the board. To create a new marker insert a new entity called prop_dry_erase_marker. The default settings will create a red marker. If you want to change the colour, you will want to change both the Marker Tip Color and Marker Line Color.
- Marker Tip Color - This defines the visual representation of the marker, both in hammer and to the player in game.
- Marker Line Color - This is the line color that is drawn on the whiteboard.
Note: Although it is set by default, ensure your Skin render property is set to Tintable, this allows the game to change the colour of use the marker tip to easily represent to the player what colour the pen will draw as.
There are six types of marker:
|Round Tip||Drying Out||Dirty - Rough edges||Dried Out - No Color||Erase||Chisel|
Each of these types are rendered differently in game so have a play. If you want a standard marker use Round Tip.
|Marker Tip Color||Red|
|Marker Line Color||Red|
|Marker Type||Round Tip|
To create the eraser that removes drawings on a whiteboard, create a new prop_dry_erase_marker, set the Model to models/props/interior_deco/dry_erase_eraser.vmdl. Make sure the Marker Type is set to Erase and I recommend using a Marker Size of 45.
Note: You can use your hand and fingers as an eraser
Create several different pens and an eraser if you like and put them near the board.
You are now done, go in-game and have a doodle.