View Full Version : Horror Game pocket light
I'm busy making a horror game it is possible for your player as a pocket lamp or something.?
As on this video
http://www.youtube.com/watch?v=hICr3TFZUco
Denny
11-20-2009, 11:39 AM
Attach a spot light to the player? :)
How can i do this if i click on the player and Click on Table Attachment and then ??
smerf1
11-20-2009, 06:50 PM
i would also like to know this!
micahpharoh
11-20-2009, 07:06 PM
you could attach it, or make it a weapon if you want the player to be able to switch between it and another weapon. This would be how to make the player visually hold the light, too.
Malachor
11-20-2009, 08:30 PM
Have a look at this: Attaching a spotlight to the player (http://www.moddb.com/games/unreal-tournament-3/tutorials/unreal-learning-5-attachments)
It shouldn't be too hard to modify this to fit onto a weapon, or create a torch.
Thank you but its don't work i have set in in a script and save it as LP_Mutator_Flashlight
but i can't find it in actor classes
I'm looking for some help with this topic too, any ideas or tips?
DJMidknight
04-30-2010, 01:10 PM
why is it a mutator?
make it a weapon that the firestate turns it on and off then you should be able to put it in the pickupfactory.
Kratilim
05-02-2010, 04:20 PM
Hi guys,
I've been working on a horror game myself. Its quite easy to accomplish actually. I will not just paste the code here, you will not learn anything if you copy paste all of it. the following assumes you are extending an existing weapon or making a new one.
Make a global spotlightcomponent at the beginning of your weapon. Like so:
var SpotLightComponent LightAttachment;
Don't forget to also define any extra things like scale and color.
This next code is needed in the postbeginplay, otherwise LightAttachment has no property:
LightAttachment = new(self)class'SpotLightComponent';
You can then in your postbeginplay define where you want your light to be, and if its enabled or not. You can also attach it to a socket of a skeletal mesh. for example:
UDKSkeletalMeshComponent(Mesh).AttachComponentToSo cket(LightAttachment, 'LightSocket');
To make it turn on and off you can simply switch it in the StartFire function.
Hope it helps! :)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.