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. 

Newbie Blueprint creating switches question

I am new to UE4 and scripting in general and have started with some basic switch puzzle gameplay. I have set up 4 switches (each with it's own collider and variable to store state); each switch is supposed to turn another item on and off. Currently I check for overlap on each switches collider and activate the player controller when inside it (this all works). I check for the action key 'F' and by way of a flip flop I set a boolean true/false to set visibility on/off for the item it controls - this also all works. The problem is that each switch controls all items rather than just the one I want. I think it is because all are look for the same action 'key' to be pressed. Is there a way to bind a switch to a specific object so that I only turn on/off the one I want?

Product Version: Not Selected
Tags:
more ▼

asked Mar 29 '14 at 06:21 PM in Blueprint Scripting

avatar image

Lucasbman
1 1 3 2

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

4 answers: sort voted first

I haven't tried this yet but the logic is there:

Create a variable that is the same as your actor type, make it public so that you can access it in the details panel and then assign your switches to specific objects in the scene.

more ▼

answered Mar 29 '14 at 06:25 PM

avatar image

jestersheepy
489 16 22 27

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

Without seeing your blueprint layout what you could do is make it that the input only works when you are in the trigger for that object.

So hookup would be INPUTKEY -> TRIGGER -> TRUE -> continue/ TRIGGER -> FALSE ->something else

you would have do this on each piece to separate them also this video (if you haven't watched it already will help)

Blueprint 8 and Trigger Light

more ▼

answered Mar 29 '14 at 06:32 PM

avatar image

DJMidKnight
1.2k 50 24 51

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

Without seeing your BP we can't really tell what you should change, but what I can suggest is that you need to enable / disable player input for each trigger. Here's an example.

alt text

example.png (151.9 kB)
more ▼

answered Mar 29 '14 at 07:57 PM

avatar image

Clunk47
400 48 53 251

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

Thanks for your answers - attached are screenshots of my networks which look similar to the ones posted. I basically have 4 versions of it - one for each switch and object. If you can see any obvious issues I would appreciate it.

more ▼

answered Mar 29 '14 at 11:17 PM

avatar image

Lucasbman
1 1 3 2

(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