You just need to add your “addEXP” node to the “TakeDamage” function.(Look for the ServerChangePlayerStateInfo node)
Also add a “EXPGain” variable to the Player_Parent and MonsterDB_Structure for the Monster_db then modify the “ServerSpawnMonster” node to set the EXPGain variable of the enemy.
As SlightlyLive already said there is a Swordman example in the project files.
Your steps: Reparenting your Melee Character BP with the Player_parent then add ‘InitPlayer’ to the ‘Event BeginPlay’ and use the ‘ServeApplyDamage’ node. | Example with a hitbox
(Add this to the Bullet_Parent, all Grenade and Magic BP’s)
You can create a variable to your Player like “BlockRate(0-100)” and connect it to the “CalcChance” macro.
I went to go purchase from the Marketplace and its for 4.11 at this point… My new project is 4.12. I’m sure you’ve updated and waiting on Epic? Thanks!
On the Server Apply Damage Event, the owner player controller determines that type of Damage done. This works fine when two players are fighting and damaging, but for the AI example it doesn’t work.
On the example I’ve followed and in the screenshot, I’ve plugged in the player controller into the owned player controller input for the event, so when the Event resolves the damage, it ignores the spawned Monster ItemDB setting.
So when the NPC attacks, it deals the ItemDB damage type that me, the player, has selected (and I can change this type by selecting various weapons and the NPC damage to me will change with it!).
So, this method of applying damage ignores the ItemDB data for the spawned monster.
Thank you for reporting this issue! I forget to add a IsAI branch to the ServerApplyDamage nodes.
Player info’s are stored in the PlayerState_MP but not for the AI.
Is adding elements as simple as adding them to the structures for itemdb and armor db? Basically how hard is it to add new elements to the system, like a Holy and Dark elements for example?
I think i figured it out. added a holy to the armor db and noticed that not only did it add to database (as expected) but a new node for the element came up in the armor db break in the player parent. Really is easy to modify this was worth every penny thank you!