How did you get on? Did you get the TankAIController
receiving the multicast? How about the TankPlayerController
?
Seems that way
I got it all working in the end, but this was probably the most difficult video in the series so far. I had trouble finding usage documentation on the DECLARE_DYNAMIC_MULTICAST_DELEGATE macro, and Visual studio showed errors even when i used it correctly.
Visual Studio and its very slow Intellisense is the hardest part in this challenge. It can not handle the Macro Definition very well and will leave you alone until you compile and go on anyway
It’s bugging me that the newer versions may have changed syntax. I am currently getting a compiler error about type conversions
CompilerResultsLog: Error: \TankAIController.cpp(25) : note: There is no context in which this conversion is possible)
.
Copied the syntax directly and also while doing the challenge myself have tried other methods(obviously failed as they weren’t correct usage).
Does anyone know of any changes to UDK regarding delegates?
Also I’m wondering if the engine can’t access my &ATankAIController::OnPossessedTankDeath correctly. For example when typing #includes I have to include “Public/” to my header includes
EDIT: I ADDED PARENTHESES TO &ATankAIController::OnPossessedTankDeath. It was &ATankAIController::OnPossessedTankDeath()… 4 hours
Patience, young crickets.
Mine is not working, the OnDeath.Broadcast(); in Tank.cpp says “Expression must have class type”, any ideas?
EDIT: I needed to remove the ()'s off of my FTankDelegate OnDeath(); to just FTankDelegate OnDeath; in the .h. Then my AI was broken but I just deleted the intermediate and restarted UE to fix that.
Got it working just great
I know I’m a bit late to comment on this, but I’ll give my two cents.
For me, this has been by far the most difficult challenge of the course. Broadcasting methods are useful, but the implementation is not intuitive and the documentation and examples are very scarce. Even then, examples on the internet tend to assume people have a base knowledge that they may not have.
I think Ben explains it well in the video, but for anyone reading this, don’t feel bad if you couldn’t complete the challege on your own.