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"

Creating a 'checklist' for casting to a Parent Class with Event Tick?

Hey y'all, I'm trying to set up two characters to play an anim when the player looks at them. The goal is to have each one only play their respective anim once. I have a setup working well, but I'm wondering if there's a simpler, more efficient way to go about it.

Here's the current setup that does the job: alt text

I wanted to see if I could simplify it by only using one Cast and one Play Montage. Since CharacterA and B are children of Character_PARENT, I was able to do this setup, with a couple issues... alt text ...I can't figure out how to...

  1. Have each character only play their 'instruct' anim once (I'm doing this with Do Once nodes in the original setup, but now that there's only one execution path, I can't use that anymore)

  2. Once both have played their anims, I want to close the Gate so that the Event Tick isn't firing into the Trace and Cast every frame (which I haven't figured out for the original setup yet, either)

Any ideas would be very much appreciated!

Product Version: UE 4.18
Tags:
more ▼

asked Jan 22 '18 at 06:15 AM in Blueprint Scripting

avatar image

RaNewt
26 4 3 8

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

1 answer: sort voted first

Hey there, the animations are supposed to play only once throught the entire game or they can play again eventually?

more ▼

answered Jan 22 '18 at 11:05 AM

avatar image

xlar8or
6k 162 129 305

avatar image RaNewt Jun 13 '18 at 11:16 PM

so sorry for the delayed response. And, no worries if you don't respond further. But, I wanted to clear up all my requests and saw this one that I didn't respond to.

to answer your question: these anims only need to play once.

avatar image xlar8or Jun 13 '18 at 11:35 PM

One way of doing it is to have a bool variable in the Character_Parent called Has Been Seen? which you set to true when you play the animation for the first time. You can also use that variable with a branch before you play the anim montage, that way it will only play once (when the value is false). To check if both characters have been looked at, you can have a counter variable on the player that is incremented every time you execute play anim montage and instead of the gate you can just have a branch that will do the whole logic only if the counter is less than 2.

avatar image RaNewt Jun 14 '18 at 12:51 AM

this makes sense to me. I have pivoted away from the original project, but as soon as I can play around with this idea to confirm I understand it and it works, I'll respond and resolve it. thank you!

avatar image xlar8or Jun 14 '18 at 07:59 AM

Surething :)

(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