Announcement

Collapse
No announcement yet.

cant somebody point me in the correct dirrection for casting

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

    cant somebody point me in the correct dirrection for casting

    i feel like this should be really simple. but ive watched every tutorial i can find and everytime i hit the same problem. the tast is simple. there usually something like a button and a door. which is my current problem. and i cant figure out how to get the reference. so it wont work.

    my ultimate goal that i need to move forward is widget contolling the door. im kinda going for a mission door where i can select a level. and the level streams in behind the door and then it opens. ive got the streaming figured out. but i cant get the door to open. because i cant figure out how to get the reference. and my biggest frustration is how everybody tells me the use get all actors of class. then tell me shortly after that i should never use it in a real game because of how expensive it is, and that there are more proper ways to do it. but nobody will every say the proper method.

    can someone please help me

    #2
    Event dispatchers are usually good for widgets.

    In your widget make an event dispatcher and call it when the button is pressed. Then the door can bind to this event dispatcher and do whatever it needs to do. The door will need a reference to the widget in order to bind to it though but you only need to do this once.

    If it is a world space widget attached to a widget component on an actor then the door could simply have a variable reference to that actor marked as "Instance editable". Then in the level select the door and in the details panel find the variable and set it to the world space widget you want to "link" the door to.

    Comment


      #3
      Cool. Ill give it a look. Maybe event dispatcher is whet i thought i had. But that sounds like what i need

      Comment

      Working...
      X