The setup I have thus far is this:
- At the begining of the game player posses the camera; they can edge pan and zoom.
- The player also posses a character on the map. I followed an RTS tutorial that included being able to select different characters to control. So, normally, nothing would be possesed at the begining, until something is clicked, however since I will only have this one character I assign it to the player at the begining.
-In the TopDownController I have code that checks what is clicked and then stores that code in a variable. I used print string to verify if it is identifying the enemy blueprint correctly and it is. I am also quite sure that the variable gets filled with that actor.
-In the TopDownCharacter blueprint I have a function to attack. I takes a target, does AI move to, then plays an animation for attacking.
-I have connected with a blueprint interface (though I am not sure if I did that correctly)
What I was trying to do was at the end of the code in the controller, call the Attack function from the Character blueprint. I.e. Controller identifies target, then character attacks target.
Here is what I have thus far:
When it comes to referencing these two codes to one another I don’t really know what I am doing. I think the rest of the code should work as expected once they have the right references. What should I connect to the target of the Attack Actor function, and what should be connected to targed actor in the AI move to? Or is this setup wrong, and there is a better way to do it? I would appreciate any advice.