GetActor Code

Hello,

I have triggers that I want to attach doors to. Essentially it works in the opposite direction of the OpenDoor Code in the EscapeBuilding Section. I have this code all ready and working.

My issue is this:

I want to call the angles up for these doors. But in order to do that I need to GetActor. However, they are initialized to nullptr. I assume I need to find a way to point my AActors to some other actor within the game.

How do I do that?

What do you mean?

What class are you writing this in. How would an instance of this class be used? Is there any connection to that and the door?

I figured out that my overall approach was wrong. So I will be doing instead:

  1. Going back to the OpenDoor code. I was working my code backwords. Essentially I was making my “bool” (trigger volume) my code to open the door, rather than my code on my door being triggered by the bool (Trigger Volume).

  2. Second, after looking at various projects and their ideas I realized that I am boxing myself in too much. If I want a particular feature, even one that was covered, but in a different way, there is no harm looking for it. That way I can exercise the problem solving skills and mindset I need anyway for game development, and learning how to ask proper questions and do independent research.

Essentially I was asking the wrong question: How to get AActor to work in this way. But I was not asking: Why do I want it to do so? When I stepped back I came to the desired feature, and the problem began resolving itself.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms