We start by dropping in a spotlight move-able and a player start. They must be close to each other and facing the same direction.
Converting a light to a spotlight movable |
We then can jump into the lights properties and decrease the lights influence area and colour to give it a glow to make it seem more like a torch.
Spotlight properties |
Once its in the next step is to jump into kismet and start a bit of programming.
We start by adding a level loaded and attach to actor block. We set the attach to actors target to players and un-tick the option within it that selects all players. We then must a attach the light to its attachment option.
Flashlight kismet |
At this stage the light will work and follow the player however the lower part of the code deals with making the light toggle-able. Add in the key/button pressed and toggle blocks.
We add E as an input name. Then when pressed it will activate the toggle block and toggle the light on and off.
Kismet for toggling flashlight |
This is the finished result.
Finished flashlight in UDK |
No comments:
Post a Comment