x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to turn a light off?

alt text

What am I doing wrong here? I have a scene component light and I just want to turn it on an off with T.

Product Version: Not Selected
Tags:
more ▼

asked Jun 18 '14 at 03:40 AM in Blueprint Scripting

avatar image

GG04
126 8 12 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Found the problem. The gun was not receiving input, but the playerpawn was.

more ▼

answered Jun 18 '14 at 03:12 PM

avatar image

GG04
126 8 12 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

If the "Directional Light 1" variable is accessing an actor in the game, that should work. How do you have this set up in your project?

more ▼

answered Jun 18 '14 at 03:57 AM

avatar image

iveytron
321 8 7 15

avatar image GG04 Jun 18 '14 at 04:01 AM

Basically, it's just a weapon blueprint. There is a first person gun, a third person gun, and a light. They are all component actors. Directional Light 1 is a component in the blueprint.

avatar image iveytron Jun 18 '14 at 04:14 AM

Are you trying to make a flashlight for the gun? if so, don't use a directional light, use a spotlight. The Directional Light will light the entire scene, which might be why you don't see the effects of the toggle.

avatar image GG04 Jun 18 '14 at 04:38 AM

Gotcha. I changed it to a Directional Light, which also does not work.

Here's what I'm looking at

alt text

alt text

1.jpg (102.0 kB)
2.jpg (55.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You just need a do once sir with a reset in the released. Please note that the event for pressed is fired continuously while pressed so you are turning it on and off rapidly as you press it.

alt text

flashlight.png (264.6 kB)
more ▼

answered Jun 18 '14 at 10:24 AM

avatar image

Shoiko
638 57 55 68

avatar image Arty-McLabin Mar 24 '17 at 10:25 AM

it's not true. "Pressed" event only occurs once per each "press->release" cycle

avatar image Shoiko Mar 24 '17 at 11:18 AM

It did back in 2014. It no longer does it.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question