Custom "pedestal button" with 4 skins + Example Instances  1.2

Uploaded Mon Feb 24, 2014 2:26 am by josepezdj

Description

This is a custom model based on the stock "pedestal button" but with 4 skins:

Image

I just decompiled the stock model and edited the .QC file to recompile it again with more textures. This was requested to me by Srs Bsnss and I thought somebody else in the community could be interested in it as well.

This is a pack that includes the following:

1. A custom model based in the stock "pedestal button" (switch.MDL) with 4 skins instead of 2:

- Skin 0 = Clean button OFF (blue lines)
- Skin 1 = Dirty button OFF (blue lines)
- Skin 2 = Clean button ON (yellow lines)
- Skin 3 = Dirty button ON (yellow lines)

2. A custom animated texture with 4 frames to match the button type and state. These are: Clean ON and OFF, and Dirty ON and OFF.

3. An instance called "custom_prop_button.vmf" emulating the prop_button Portal2 entity, where you can select the value of the following variables:

- Button_reset_delay = you can enter whatever float value (a number with decimals) or integers. This value determines the time for the button to reset and go back to the initial state.

- Button_type = "0" is the clean one while "1" is the dirty model. Note that the pedestal skins will change as well accordingly in this instance ;)

- Play_timer_sound = "0" means not to play it, while "1" means to do. It will play or not the classical "tick-tack" sound.

- Prevent_fast_reset = "0" means no, and "1" means yes. This will prevent the player from pressing the button again while it's still into the "reset_delay" time set before.

4. An example map in the case you need help with setting the button up into hammer.

5. The decompiled files (the .QC file and the .SMD files) for anyone interested in changing something in the model or adding even more skins and whatnot...

INSTRUCTIONS

- There's a folder inside the zipped file you downloaded called "portal 2", this folder and its structure inside is exactly as the one you have in your computer, so just copy the folder "portal 2" on the "Steam/SteamApps/Common" folder, and everything will go to its right place.

- The custom button model is named "switch_4skins.mdl" and it is located under /models/props/ folder

- The model's textures are located into /materials/models/props/ folder

- The custom texture jose_button_frame_alpha(.VMT and .VTF) for the pedestal base goes into /materials/josepezdj/detail/ folder

- The instance with the example button is into sdk_content/maps/instances/josepezdj/ folder

- The example map (.VMF and .BSP) into sdk_content/maps/ folder

NOTE

Don't forget to give it a NAME to your func_instance into hammer when you use the custom instance "custom_prop_button.vmf" for its I/O to work properly ;)

Do not hesitate to ask me anything related to this content.

Cheers!

jose


ChangeLog

v1.1
- I improved the button textures tweaking a bit the alpha channel in order to get the right self-illumination
- I added the corresponding (multi-framed) texture for the button's pedestal itself including the 4 skins/frames (clean-dirty / on-off)

v1.2
- I added 2 more variables to the button instance: the "prevent fast reset" feature, and the possibility to play the timer sound.


Details

  • View Topic
    5.00 / 5 (4 votes)
    Thu Feb 27, 2014 5:09 am by josepezdj
    Wed Jul 25, 2018 12:55 am

Thumbnail

Thumbnail




Jump to: