wonk
New vMember
Posts: 1
|
Post by wonk on Aug 26, 2019 10:16:37 GMT
The new vObjectDamage script that Invector uses in their flamethrower tutorial is not integrated with EmeraldAI. What you need to do is attach the modified code snippets from the vProjectileControl script integration.
In vObjectDamage add these lines of code:
Under the line (about line 98 in protected virtual void OnCollisionEnter(Collision hit))
{ ApplyDamage(hit.transform, hit.contacts[0].point); }
add //Emerald AI Damage if (hit.collider.gameObject.GetComponent<EmeraldAI.EmeraldAISystem>() != null) { hit.collider.gameObject.GetComponent<EmeraldAI.EmeraldAISystem>().Damage(damage.damageValue, EmeraldAI.EmeraldAISystem.TargetType.Player); }
Under the line (about line 116 in protected virtual void OnTriggerEnter(Collider hit)) { onHit.Invoke(hit); ApplyDamage(hit.transform, transform.position); }
add //Emerald AI Damage if (hit.GetComponent<Collider>().gameObject.GetComponent<EmeraldAI.EmeraldAISystem>() != null) { hit.GetComponent<Collider>().gameObject.GetComponent<EmeraldAI.EmeraldAISystem>().Damage(damage.damageValue, EmeraldAI.EmeraldAISystem.TargetType.Player); }
Under the line (about line 161, in protected virtual void OnParticleCollision(GameObject hit)) { onHit.Invoke(collider); ApplyDamage(hit.transform, transform.position); } } i++; }
add //Emerald AI Damage if (collider.GetComponent<EmeraldAI.EmeraldAISystem>() != null) { collider.GetComponent<EmeraldAI.EmeraldAISystem>().Damage(damage.damageValue, EmeraldAI.EmeraldAISystem.TargetType.Player); }
If your EmeraldAI creatures are tagged correctly they should start taking damage
|
|
|
Post by comangallc1 on Oct 4, 2019 21:53:16 GMT
|
|
|
Post by deidrereay on Jul 6, 2020 18:57:07 GMT
Hey has anyone figuired out how to get the VBOW to work with emerald ai??? Have followed the tutorials and reaching out to emerald creators gets no response.. Did all the script changes from the integration videos and now we have melee working both ways and damage. Last step is that dang bow. Anyhelp would be much appreciated
|
|
|
Post by deidrereay on Jul 6, 2020 21:39:57 GMT
Nevermind looks like i got it to work. was a problem with LOD group and LODS working with emerald and invector (which there are so many issues with that its ridiculous I recommend Mantis LOD for any of you using Unity) Wondering though is it actually the Box collider arrows are hitting and causing damage sent?? any one know?? \
|
|
|
Post by chairiko on Jul 13, 2020 11:51:24 GMT
How to get damage with damage multiplier included
//Emerald AI Damage
if (hitInfo.targetCollider.gameObject.GetComponent<EmeraldAI.EmeraldAISystem>())
{
hitInfo.targetCollider.gameObject.GetComponent<EmeraldAI.EmeraldAISystem>().Damage(hitInfo.attackObject.damage.damageValue*damageMultiplier, EmeraldAI.EmeraldAISystem.TargetType.Player, transform, 400);
}
|
|
|
Post by chairiko on Jul 13, 2020 12:00:54 GMT
How to use LockOn and EmeraldAI
Add a vHealthController script to your AI. Set the same layer as the damage you can attack on.
Set the same values that your enemy has to the Health Controller script.
|
|
|
Post by zgoodwin on Jul 18, 2020 1:19:19 GMT
Unable to receive damage from Emerald AI characters. Hit text shows but no damage is registered at the Invector Player side. Has the "SendEmeraldDamage' for animation events changed to something else? I do have ..
DamageInvectorPlayer(DamageAmount, Target);
.. uncommented in EmeraldAIPlayerDamage.cs per instructions.
|
|
|
Post by uberwiggett on Jul 18, 2020 2:50:10 GMT
check that you have also uncommented the "damageInvectorPlayer" method too, i did a quick fiddle with EMAI 2 the other day but I didn't test damage on the player, but i do recall there are a few places you need to uncomment.
|
|
|
Post by zgoodwin on Jul 19, 2020 7:58:58 GMT
Discovered the problem after much trial and error. Player Limb TAGS were set to Player, when it should've been Bodypart. Receiving damage now.
|
|
|
Post by deidrereay on Jul 31, 2020 0:46:06 GMT
Hey Has anyone looked into making V object Damage doing damage to the emerald ai animals etc.?? We followed an old invector tutorial and got some magic effects working great against other invector ai, but not to emerald.// Any help would be appreciated. thanks
|
|
|
Post by uberwiggett on Aug 1, 2020 15:35:23 GMT
hey mate, check the vObjectDamage script for the damage call. If you look at the Projectile and Melee edits required by EmeraldAI, you can pretty much just replicate the process for vObjectDamage (which i think is just any damage object including world damage)
edit: actually, look at the post at the top of this page, it does exactly that...
|
|
|
Post by deidrereay on Aug 1, 2020 18:26:46 GMT
Thanks i just saw that post as well lol
|
|
|
Post by laowai on Aug 31, 2020 0:08:19 GMT
Thanks i just saw that post as well lol Did it work for you? I tried what's been mentioned above but to no success!
|
|
eldv
Junior vMember
Posts: 47
|
Post by eldv on Sept 1, 2020 10:24:39 GMT
Thanks i just saw that post as well lol Did it work for you? I tried what's been mentioned above but to no success! I was able to get it to work without much trouble. The post is a little hard to read, so I botched it the first time I did it. Thank god for multiple undo in Visual Studio! But after following very carefully it’s working just fine. I have it on a poison rain and it kills both player and Emerald AI enemies.
|
|
|
Post by laowai on Sept 1, 2020 22:48:14 GMT
Did it work for you? I tried what's been mentioned above but to no success! I was able to get it to work without much trouble. The post is a little hard to read, so I botched it the first time I did it. Thank god for multiple undo in Visual Studio! But after following very carefully it’s working just fine. I have it on a poison rain and it kills both player and Emerald AI enemies. Thank you for giving me more hope lol I haven't been successful in making it work so far. I don't know what I'm doing wrong in the scripts! I will give it another go and see.
|
|