Hello guys.
I’m making a Weapon Inventory, so that the FirstPersonCharacter can collect his weapons and switch through them pressing the corresponding key on the keyboard.
Now, I created a Base Class (called Weapon) and a Derivated Class from it (called Minigun).
I’m gonna use the Minigun as example for my purpose.
I created two variables on the Character: OwningWeapons (array of Weapon objects) and ActiveWeapon (Weapon reference object).
I then created some functions on the Character: AddWeapon, CheckAlreadyOwning, AddBullets
I’ve troubles in AddWeapon function.
How do I create a new Minigun object?
This is what I did for the moment:
AddWeapon
As you can see, at first I check WHICH weapon has been taken. In this case, I check only for the Minigun.
If the Minigun has been taken (second Branch) then ADD to the Weapon array a new Minigun object
In one side I have the branch, in the other I have the ADD Function (linked to my array of Weapons)
My question is: how to create a new Minigun object and link it to the ADD Function?
I tried using Construct Object From Class:
But when I compile, I get those errors.
What is the OUTER and how to use it? Thanks!