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"

Why am I unable to call a custom event via Cast to Character?

I am stuck: I have a character called "my character" and I am trying to cast to it from another blueprint. I have set up the "get player character" and the "cast to mycharacter" but the custom event won't show up?

Product Version: Not Selected
Tags:
more ▼

asked May 31 '14 at 04:55 PM in Blueprint Scripting

avatar image

4ndy
5 4 7 9

avatar image robbiecooper May 31 '14 at 05:03 PM

Hi 4ndy. Post a couple of screen grabs, one of the character BP and one of the other blueprint. Ta

avatar image 4ndy Jun 01 '14 at 10:22 AM

Here it is. I also can't cast to my Animation BP...

https://dl.dropboxusercontent.com/u/8833758/Blueprint/casting.jpg

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

1 answer: sort voted first

Hey 4ndy, I've got some custom events set up, and how the event is named in one BP is exactly the same as how it is referenced in the other. Your events are called startruning in one and Startrunning in the other. Check to see that you are using what you set up in mycharacter, from the game blueprint.

I tried to set up a custom event node in one of my blueprints, with a lower case first letter. I couldn't do it. Regardless of whether I wrote the name of the event on the node itself or in the details panel, the first letter was automatically turned into an upper case letter. Are you creating the event node, in mycharacter, by right clicking in the eventsgraph and then event, custom event? Once you've done that, created your custom event, you should then compile, go to the other blueprint, cast to my character, and when you drag off a wire from cast to mycharacter, your custom event should be available...

more ▼

answered Jun 01 '14 at 01:16 PM

avatar image

robbiecooper
766 79 61 235

avatar image 4ndy Jun 01 '14 at 02:11 PM

Thank you robbiecooper, I did exactly that. Still doesn't work. No matter what I try...

avatar image DJMidKnight Jun 01 '14 at 05:04 PM

Ok lets go over this is the to start. When you cast to something and you pull off a node from the AS mycharacter or whatever blueprint are casting to you will get a variable or event that exist in that MYCHARACTER/other blueprint.

I don't understand why you are trying to create another event.

Also I think you are trying to do the event backwards?

avatar image Steve Allison STAFF Jun 02 '14 at 10:04 PM

To elaborate on what DJMidKnight was saying, dragging off pins (execution or otherwise) is context sensitive and to be able to call the custom events from your Character blueprint, you'll need to drag off the As MyCharacter pin on the Cast To node, not the execution pin of the Cast To.

avatar image 4ndy Jun 03 '14 at 06:04 PM

Thank you guys, that worked! I did not drag of the "As Mycharacter" pin but the exec pin.

DjMidKnight, I have one BP that basically controls the game but I wanted character specific stuff to fire off the character BP such as Jumping, Speed, Rotation etc. As I saw it, there are specific functions that are only accessible on the character BP. I don't know if I understand it correctly, I'll try to rethink my logic.

Besides, I wouldn't know how to cast from the character BP back to the regular BP since there is no "cast to" function, is there?

But anyways, many thanks for the help! Simple stuff, but still gave me a headache :-)

(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