|
Post by noobstuff on Sept 27, 2019 8:16:00 GMT
I was able to make the player take damage from AI easily, because the documentation clearly explained this. However, I’m having a bit of trouble performing the opposite. I now want the player to be able to damage the enemy AI. I am using the Pro Military FPS Controller (https://assetstore.unity.com/packages/templates/systems/pro-military-customizable-fps-character-125288). Has anyone been able to get it to work with it? My shots just keep placing a generic “hit effect” decal on the AI bot, but is not causing any damage. I have my layers set up, and RigidBody / Capsule Collider. I believe Continuous Speculative is used in place of other collision detection types, and this “collision” concept is fairly new to me (as can be told by my username), so I’m a bit confused as to how I can get my bullet casts to actually cause damage to the AI bot. I’m a quick learner so I can definitely pick up on things, but the FSM documentation felt slightly vague in explaining the full workings of adding damage to the AI. I’ve followed other tutorials and guides in order to learn more about this subject, but I think I may need a little more explained in direct relation to what I’m working with (FSM and the Pro Military controller) to help me in the right direction. I feel that this is way easier than it seems (after all, I just need a collision to trigger damage, but I’m not sure what I’m missing to set up properly!), I feel that I may be overthinking this, please help. Thanks!
|
|
|
Post by Invector on Sept 27, 2019 14:58:31 GMT
When using other systems you will always need to create some kind of bridge between the systems to communicate damage.
We use our own damage system based on collision called vDamage which you can see a generic example in the vObjectDamage script, basically, you will need to implement the vDamage to your new system weapon.
I think there are a few ways to do it, but it also depends on how the other system works, if it's raycast could be a little more work but if it instantiates an object it's more simple, you could for example add the vObjectDamage and simple set the weapon damage to be the objectdamage
|
|
|
Post by noobstuff on Sept 29, 2019 9:26:41 GMT
When using other systems you will always need to create some kind of bridge between the systems to communicate damage. We use our own damage system based on collision called vDamage which you can see a generic example in the vObjectDamage script, basically, you will need to implement the vDamage to your new system weapon. I think there are a few ways to do it, but it also depends on how the other system works, if it's raycast could be a little more work but if it instantiates an object it's more simple, you could for example add the vObjectDamage and simple set the weapon damage to be the objectdamage A feature of the Pro Military FPS controller is that a generic bullet impact decal is instantiated at the point of collision with any object, so I’ll look into hooking into that. Thanks for the insight, Invector.
|
|