saoc
New vMember
Posts: 6
|
Post by saoc on Dec 24, 2018 19:39:48 GMT
Hello, I bought the AI Template a few months ago and I always used it with the Invector TPS, now I am trying to use the AI With the following asset: assetstore.unity.com/packages/templates/packs/third-person-cover-shooter-template-88424I have tried in different ways(Already read the online documentation) and I have not been able to make the player hurt the AI, or vice versa . Could you tell me what is the function or method to be called to hurt the AI? or if this is not how it works, could you guide me in the right direction? Thanks in advance!
|
|
|
Post by tchrisbaker on Dec 25, 2018 7:51:00 GMT
Here's an example of my doDamage code void doDamage(Transform sender, GameObject target, Vector3 hitPosition, int reactionId, int damage ) { vDamage _damage = new vDamage(); _damage.receiver = target.transform; _damage.sender = sender; _damage.hitPosition = hitPosition; _damage.reaction_id = reactionId; _damage.damageValue = damage; target.ApplyDamage(_damage); }
|
|
saoc
New vMember
Posts: 6
|
Post by saoc on Dec 26, 2018 19:32:57 GMT
Here's an example of my doDamage code void doDamage(Transform sender, GameObject target, Vector3 hitPosition, int reactionId, int damage ) { vDamage _damage = new vDamage(); _damage.receiver = target.transform; _damage.sender = sender; _damage.hitPosition = hitPosition; _damage.reaction_id = reactionId; _damage.damageValue = damage; target.ApplyDamage(_damage); }
Thanks! I hope I can do something following your reference.
|
|
|
Post by tchrisbaker on Dec 28, 2018 3:57:04 GMT
|
|
|
Post by jime363 on Jan 11, 2019 17:28:06 GMT
Here's an example of my doDamage code void doDamage(Transform sender, GameObject target, Vector3 hitPosition, int reactionId, int damage ) { vDamage _damage = new vDamage(); _damage.receiver = target.transform; _damage.sender = sender; _damage.hitPosition = hitPosition; _damage.reaction_id = reactionId; _damage.damageValue = damage; target.ApplyDamage(_damage);
}
BRO HOW AM I SUPPOSED TO CALL THIS FUNCTION... DODAMAGE(); DIDN'T WORKED .. I KNOW THERE IS ANOTHER METHOD TO CALL THESE FUNCTIONS .. I AM INTEGRATING WITH RFPS
|
|
|
Post by tchrisbaker on Jan 12, 2019 3:10:00 GMT
BRO HOW AM I SUPPOSED TO CALL THIS FUNCTION... DODAMAGE(); DIDN'T WORKED .. I KNOW THERE IS ANOTHER METHOD TO CALL THESE FUNCTIONS .. I AM INTEGRATING WITH RFPS can you post your code?
|
|
|
Post by jime363 on Jan 12, 2019 4:49:36 GMT
The rfps code is too long.. From which asset did you integrate the fsm ai with this code.and ..can you post full code.. Where you made changes...
|
|
|
Post by tchrisbaker on Jan 14, 2019 3:48:19 GMT
The rfps code is too long.. From which asset did you integrate the fsm ai with this code.and ..can you post full code.. Where you made changes... I'm using Invector's FSM. vDamage is Invector's class. So basically you're just calling ApplyDamage which is an Invector function and supplying the vDamage parameter This is from Invector's API documentation
virtual void Invector.vObjectDamage.ApplyDamage (Transform target, Vector3 hitPoint )
|
|