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"

Day Night Cycle Custom Event

I am fairly new to BP scripting and have no coding knowledge

I've followed the tutorial on this page: https://wiki.unrealengine.com/Tutorial:_Time_of_Day

The custom event nodes I've place in other blueprints don't appear to work though. Is there something I'm missing that wasn't explained in the tutorial? My understanding is that Remote events from the level blueprint are able to be read by all other blueprints in the level?

Product Version: UE 4.15
Tags:
more ▼

asked Apr 27 '17 at 08:18 AM in Blueprint Scripting

avatar image

Jimonions
57 10 15 25

avatar image Two-faced Apr 27 '17 at 07:53 PM

Could you provide a screenshot where you actually call these events?

avatar image Jimonions Apr 28 '17 at 12:54 AM

Hey, this is my skylight BP to change colour and intensity skylight

This is my level BP. The sun rotation is handled through another BP, both referencing the same actor. This BP appears to work correctly firing once every sunset / sunrise. levelBP

avatar image Two-faced Apr 28 '17 at 05:56 AM

I can barely see what's going on in the second screenshot but I'm sure there is no reference to SkyLight_Blueprint)) But it should be!

avatar image Jimonions Apr 28 '17 at 07:37 AM

Heres a closer up of the end of my levelBP alt text While I was searching around before I came up on event dispatchers. But from what it seams like event dispatchers are only for other BP's to talk to each other and directly from that BP to the level BP but not the other way around. Or have i got that mixed up? Should I be creating event dispatchers from my levelBP to communicate with all other BPs?

avatar image Two-faced Apr 28 '17 at 09:44 AM

You know, I never use event dispatchers in my projects. Get the reference on your blueprint and call your event. Simple and always clear.

avatar image Jimonions Apr 28 '17 at 11:15 AM

Could you explain what you mean by reference?

Every solution I look for tells me to use event dispatcher to talk to the level blueprint while completely blindsiding the fact that My level BP is the one that needs to talk to the other BPs. Event dispatcher does not seem to work the other way around in levelBP anyway so I'm pretty much at a standstill for solutions.

What is extra weird is that the remote event node does note appear to have any wiki page or documentation behind it? I'm wondering why this is on the tutorial without any explanation or actual working example?

Here is a search for "remote event on this site alt text

avatar image Two-faced Apr 28 '17 at 11:25 AM

Let's see your tutorial. alt text

Those things from persistent level are references. BUT. If you don't have an actor placed on the map, you should get reference in another way. For example "get player character" and "cast to first player character". But you shouldn't worry in your case)) Just click over your SkyLight_Blueprint at the map, right click in level blueprint and find your functions (type call to find them faster).

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

1 answer: sort voted first

Right I guess I could do it that way, but that also means that pretty much anything Id want to do that revolves around my day night would have to be created withing my level BP wouldn't it. Doesn't sound very efficient or condensed. Not to mention needing it to work with all my child actors for other BP's too. Requiring me to go back each time to add another one in. I'm looking for a good permanent solution rather than a patchwork.

The tool tip on remote event says it finds the event name on all other levels, but in that case why use it at all in the same level like the tutorial does? Also the tutorial doesn't not have the target self variable, why is that? Does that just mean its only used to read the state of other levels and has nothing to do with the actual current level?

Whatever the case may be I have found my solution using event dispatchers called from a BP I setup for my directional daylight actor. alt text

It is basically exactly the same as my now discarded LevelBP setup from the tutorial with the exception that I call two event dispatchers at the end.

Now in my fluorescent_light_01_MASTER BP I can bind those two functions to their respective events within that BP using a get all actors of class node that outputs to the binds target. I wasn't sure about this as it seemingly has to get my daylight_BP upon each load which may get bad down the line if there are thousands of these light actors and whatnot but maybe somebody who has more experience than me can properly comment on it. alt text

more ▼

answered Apr 28 '17 at 03:07 PM

avatar image

Jimonions
57 10 15 25

avatar image Jimonions Apr 28 '17 at 03:11 PM

Thanks for sticking through with me on this two-faced kudos to you.

One last thing. I dont know why but calling event dispatchers from the LevelBP does nothing at all which is why I had to setup the BP in my Directional Light

avatar image Two-faced Apr 28 '17 at 04:57 PM

I'm glad I could help you though)

I can't tell you more about dispatchers because as I said I never use it. After a few weeks of watching mostly useless tutorials I decided to leave them behind my back. There is still much interesting bugs to hang with and no time for this complex feature))

(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