No announcement yet.

More "cast to,s" after line trace?

  • Filter
  • Time
  • Show
Clear All
new posts

    More "cast to,s" after line trace?

    Hey there!!!

    So i have my line trace, wich scans for objects in range.

    For example, i have it so if my door is in range, he send the message to the door to start doing its things (custom event in my door bp).

    The thing is, i want to use the line trace for more things and objects...

    But the last branch of my line trace blueprint only lets me go to one "cast to" (in this case, its connected to the door).
    How do i connect it to more things, please?¿

    I mean, from the branch "true" i can only use one wire to whatever i want to connect; and i would need more output wires...

    1) You should use the Cast To (The blue one) instead of separate If-Branches and then use the Not Valid Wire of the Cast Node to distinguish between different Actors.
    Click image for larger version

Name:	Unbenannt.JPG
Views:	1
Size:	56.9 KB
ID:	1122496

    2)That's actually a default UseCase for Interfaces. You declare an Interface "Interact", which is implemented by the Door or the Objects you want to interact with.
    If you found something with your trace, send a Message to this Interface. This way you don't distinguish between "Door" or "Apple" anymore, but use a common base "Interact"
    The Interface "doesn't care" if it's a door or an apple.
    Click image for larger version

Name:	Unbenannt2.JPG
Views:	1
Size:	63.8 KB
ID:	1122497
    Last edited by Raildex_; 02-03-2017, 11:20 AM.


      Hey there Raildex. This was exactly what i was looking for, the interface thing i mean.
      I saw some tutorials and with your screenshots i got it running great.

      So a BIG thank you, that was a very nice information!!!