My script comes in two parts.
One:
Making a static mesh change materials when triggered.
Two:
Making a togglable flashlight attached to the player.
So we'll start with number one. In my example, I'm having a box change from an evil face to a happy face! So I need to make two materials.
Add in a TextureParam2D sample and hook it up to the diffuse. Make sure to give the parameter a name!
Then make a new material for the second texture. Again, give it a parameter name (something different than the first).
Now create a new material instance, making the parent the material you want to change to and the texture parameter the starting texture.
Next is to create a trigger. Place it wherever you need to (mine is right next to the box because it is touch-activated). KISMET TIME! I used a dynamic trigger volume so that the trigger would occur from a distance, but you can just use the normal trigger.
Create a Set Texture Parameter node. In the first one, add in your material instance under "Mat Inst" (obviously). For new texture, put in the texture you want to change to. For the parameter name, type in the name of the parameter you put for the material of the one you're changing to.
If you want to have the material change back, then add a second Set Texture Parameter node and once again add in your instance, but this time, for new texture, add in your original texture. Keep your parameter name the same. And tah-dah! You did it. If you're having it trigger more than once, make sure to change Max Trigger to 0.
Now for the next part. Making a togglable flashlight. The items you will need: a player start, a spotlight on the player start, pointed in the same direction the player should be facing, and a trigger placed on top of the player start as well.
Here is my kismet. Ignore the dynamic trigger attach to actor if you aren't using one, that was for the changing materials. You need to attach the light and the trigger to the player upon player spawn, and then cause the trigger to make the flashlight toggle on and off. Piece of cake.
Right now, the flashlight only moves depending on what direction the player is facing, so basically it moves right and left, not up and down. I know this is possible using Unreal script, but so far, I haven't been able to figure it out with Kismet.