It’s my very first tutorial and quite a lengthy one at that! I finally got off my lazy bum to get it up. I’m making a little redundant post here but I wanted to ask the community for feedback and what they think of the tutorial. Also if any of the decisions I made in the code makes any sense or if if you have a better way.
Love to get some feedback as I had a lot of fun making this tutorial and I’m thinking of making more.
If anyone would be interested, I’m planning on making a tutorial on how to extend this tutorial to make it Network capable with C++ and a little bit of blueprints. But this time I would spend some time speaking about why and how networking is done.
I think that would be a great and logical extension of the tutorial and would appreciate a new discussion on not only how but why to do some things, often tutorials just go over the how and as often as not its the why that is just or more important to know about! Thanks a bunch!
It’s a wondful work! But how to use the parent class ITurretInterface? Where does the parent class ITurretInterface come from?
More guidance from you will be highly appreciated. class TURRETTUTORIAL_API ATurretBase : public APawn, public ITurretInterface
My apologies! I’ve been wrapped up in my day work and the next tutorial segment that I haven’t been on the forums for a few days.
I’m currently at work, but when I get home today (should be in a few hours) I can look into seeing why the Turret Interface may be causing compile issues for both of you.
First off, I’m extremely happy to know people are using my tutorial and I appreciate any feed back you may have regarding it. Now with the ITurretInterface, could you do me a solid and post me your output compile log for why it may be erroring in compile?
And just looking over the tutorial again, I just noticed a big flaw. I forgot to talk about the creation of the Interface class. I’ll get that amended, I believe that will actually resolve any issues you two may be having with it.
Yeah I completely spaced on adding the part where you actually create the base interface class to the tutorial. I feel like a dunce for doing so and possibly giving many people headaches here! When I get home tonight, I’ll make the updates and post the update here as well.
And yeah, that error pretty much confirms my mistake. If you need help with the munitions class later, I can provide assistance!
No hurries man, take your time.
And no worries about people getting stuck with the tutorial, at least for me it helped a lot to understand the whole thing much better since I went through everything line by line and tried to find the missing piece of the puzzle.
You are doing the community a great service so nothing to feel bad about.
Looking forward to the update and I will pick you up on that offer about the munitions class if I get stuck with it
Thanks! It’s much appreciated! Also here’s the update!
You want to make a new blank C++ file, name it TurretInterface, and put these in respectively.
UTurretInterface::UTurretInterface(const FObjectInitializer& ObjectInitializer)
// This is required for compiling, would also let you know if somehow you called
// the base event/function rather the override version
class UTurretInterface : public UInterface
virtual void PrimaryFireControl() = 0;
Hi, IntVoid! Glad to see your reply. Just as Chairman Meow wrote, no hurries, take your time, we have learned a lot to understand the whole thing much better now, and you are doing the community a great service so you should be proud of your achievements. And for that, I salute you!
I end up with the error Error: Shipbase.h(66) : error C2065: ‘ATurretBase’: undeclared identifier
Fixed those before by including the right .h but for this one I fail to find my error.*
Got this fixed by cleaning up my dependencies.
Also I found out that replacing AttachTo with SetupAttachment resolves the warnings about AttachTo being deprecated and using AttachToComponent being adviced without needing more arguments.
Not sure how to use that for the AttachRootComponentTo though.
Also I’ll go ahead and check in on the deprecated warnings and move to update the tutorial farther. Thank you for the input!
EDIT: So I looked into any warnings, and I’m not getting any warnings about AttachTo being deprecated (have the latest version of engine). Is this when your attaching the springarms and cameras?
EDIT2: Okay, so I found the issues, what you want to replace all AttachTo and AttachRootComponentTo to AttachToComponent. Below is specifically the turret spawn logic. For the springarm and camera, omit the turret socket name.
You’re welcome! Glad I can be of assistance! Feel free to add me to Skype if you wish to bug me for help here and there I actually just got a C++ implementation of ship movement using physics instead of whats in the tutorial, it’s quite fun spinning out of control now and then! Also congrats on breaking into C++! You can tell it can get quite confusing but fun.