Announcement

Collapse
No announcement yet.

Seems like i have forgotten something [Interfaces]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Seems like i have forgotten something [Interfaces]

    So i have followed this guide: https://docs.unrealengine.com/latest...ces/index.html

    And now after all this i have a problem to implement my function. It just doesnt do anything.


    Scenario: I have a door, and everytime the player gets near it: A Handicon starts showing up.

    Problem: Door still works but handicon (wich is set via a bool) doesnt. The bool wich is important for the binding seems to be not setted by the interface function.

    Image:
    http://www.directupload.net/file/d/4...gpno26_png.htm


    #2
    Not sure where lies your problem/bug, but when dealing with interfaces I make sure to do following:

    - interface function must have some parameter for input and something for output, else weird things happen, so if i do not care about result i always add some dummy bool variable as result
    - remember to add interface to all blueprints i want
    - when i call interface i use cast to node, i know that now unreal does not need cast to (it hides them) but again, weird things happen when you edit blueprint class you are casting to (so you cast to different blueprint class that before). So imo it is better to see all cast to nodes right there in blueprint graph instead of looking trough tiny names in node headers.

    Generally blueprints are great for small thing, bigger you go with bp they get more unstable. Recently about 20-30% of our dev time is fighting corrupted blueprints, redirectors that just redirect to redirectors then corrupt blueprints, circular references to static mesh because you used it in material preview, etc.
    If you want to make any bigger game better start learning C++, bps get messy and unstable quite fast.
    Last edited by Nawrot; 06-03-2015, 07:05 AM.

    Comment


      #3
      I just want to show an icon when the player enters a trigger box at the door. Thats all. Still not working...

      Comment


        #4
        Originally posted by Nawrot View Post
        - interface function must have some parameter for input and something for output, else weird things happen, so if i do not care about result i always add some dummy bool variable as result
        Something I learned recently. You don't need an output pin. Rather than creating an interface function instead you can create an interface event. Rightclick your graph and start typing your interface and boom there it is.

        OP, why are you using an interface here on self? Just call the function? We need to see more than what you've posted if that's not the problem.
        Columbus Ohio Unreal Meetup
        @OCGameStudio | Sphere Complex | twitch.tv/WFMOz

        Comment

        Working...
        X