Announcement

Collapse
No announcement yet.

Toggleable Flashlight for horror game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Toggleable Flashlight for horror game

    Hey guy I have come across a problem with my level for all it is scary with the lights being on i was hoping to make the lights go off for a while and the player have to use a flashlight. But although I have tutorials on making the flashlight and the control command for the toggle of the light i do not know how to make the light toggle on and off.

    Maybe i am being stupid but help would be appreciated.



    ^this is what i want it be like.

    #2
    You can set a toggle (key bind) to detach the light from the user, then set its location somewhere outside the level. Then toggle back to attach to player all in kismet. Works great.

    Comment


      #3
      Originally posted by Max Power View Post
      You can set a toggle (key bind) to detach the light from the user, then set its location somewhere outside the level. Then toggle back to attach to player all in kismet. Works great.
      That seems sort of counter productive is there not a way to just turn it off and on ?

      Comment


        #4


        Inside Key/Button Pressed add a new input name, name the button you want to use (E, F, SpaceBar, etc.). Light for flashlight should be SpotLightMovable .

        Comment


          #5
          Originally posted by DGX View Post
          Inside Key/Button Pressed add a new input name, name the button you want to use (E, F, SpaceBar, etc.). Light for flashlight should be SpotLightMovable .
          Hey man I used this and it worked a treat however the problem that is happening now is that the light doesn't go up or down its just follows my character that the same height and rotation. This is what my kismet looks like.

          Comment


            #6
            Originally posted by JHill View Post
            Hey man I used this and it worked a treat however the problem that is happening now is that the light doesn't go up or down its just follows my character that the same height and rotation. This is what my kismet looks like.
            Same thing is happening to me. I've been looking into it and it seems that something got to do with rotation was changed in the newer UDKs. One solution I found was that you could attach a spotlight to a weapon socket...which I have no idea how to do since I'm rather new to UDK.


            Originally posted by DGX View Post


            Inside Key/Button Pressed add a new input name, name the button you want to use (E, F, SpaceBar, etc.). Light for flashlight should be SpotLightMovable .
            Jesus Christ, I've been using a toggle I saw in a flashlight tut a while back that was filled with booleans, triggers and stuff...then I see this! Thanks for that, lol!

            Comment


              #7
              If you want the light to bob with player movement, attach it to the player. Then in the properties of the attach node, where it says socket/bone name (something like that) try typing, b_righthand or something similar, like b_right arm. I cannot remember exactly. Hunting on thw internet should find you the proper names. You will then need to change the lights rotation.

              Comment


                #8
                I have a similar problem. I can get a torch attached to my characters arm, but it will only rotate horizontally, not vertically. How do you make it rotate along both axes?

                Comment


                  #9
                  This is a toggleable flashlight that rotates the direct the player points it from a udk level I released a while back

                  [shot]http://chrisholden.net/tutor/flashlight_toggleable1.jpg[/shot]

                  Comment


                    #10
                    Originally posted by Max Power View Post
                    This is a toggleable flashlight that rotates the direct the player points it from a udk level I released a while back

                    [shot]http://chrisholden.net/tutor/flashlight_toggleable1.jpg[/shot]
                    Thanks man I'll try this out!

                    Comment


                      #11
                      You really should use script for this, not kismet.

                      Comment


                        #12
                        Originally posted by skwisdemon666 View Post
                        You really should use script for this, not kismet.
                        I totally agree, but do you have an idea of the script ?

                        After researches, I found this :

                        http://forums.epicgames.com/threads/...1#post29352042

                        I still wonder how to call an exec function with keybindings...

                        Comment


                          #13
                          I got a tutorial that will be online in a few days, wait for one day or two and you'll be able to do it, i already posted it before, but youtube deleted all of my videos by error

                          Comment


                            #14
                            Thank you dude

                            Comment


                              #15
                              No problem, just keep a bookmark of your thread and check up my channel i will update my signature but it will not be updated here, as this is an old post, it only gets updated if i post again,

                              Comment

                              Working...
                              X