News › Forums › Sentio Characters › General Discussion and Troubleshooting › Darkness Warlord + UFPS
This topic contains 34 replies, has 5 voices, and was last updated by darkeccho 1 week, 5 days ago.
-
AuthorPosts
-
May 5, 2022 at 11:48 am #37840
oh i changed that over to Sentio.Necromancer, which didn’t cause an error
May 5, 2022 at 11:53 am #37841cool. Yeah it’s tough to work the two together, but since I love UFPS, I make sure anything I use works with UFPS. Hopefully I can get this working with UFPS. Oh, I noticed you have Alloy Shader…I’m thinking of buying that myself.
May 5, 2022 at 12:05 pm #37842The alloy shaders are incredible, there’s a huge difference in functionality from Unity4 and Unity5 but the Unity5 version looks great, it was def. worth the money where did you see i have alloy?
Yea I know what you mean I love UFPS too and it’s pretty perfect for my game, I actually have Shooter AI working with UFPS but the melee setup doesn’t work that great, considering it was designer for AI’s that shoot that’s understandable. I mean it works but for melee you’ll probably have to create your own animator instead of using what comes with it.
May 5, 2022 at 12:16 pm #37843Ok so I updated to UFPS 1.5 and put in the scripts you provided, no compilation errors now I can receive damage but not deal damage. Hmmmmm says error on line 29: object not set to an instance of an object. (damage sender script)
I guess this is where you got stuck at?
May 5, 2022 at 2:25 pm #37849So I was able to get UFPS to send damage to the sentio character although it’s not exactly handling it with RAIN, I put the vp_damage handler script on the sentio character [Top section with other damage handlers] and assigned it the same amount of health as assigned in RAIN. The sentio character dies after you decrease it’s health BUT if it just so happens to be casting a spell when it dies the spell remains for a little while and then destroys itself. The red errors still show up in the console window.
One thing doing it this way is if you don’t have a death prefab the enemy simply disappears, this is just a quick fix and thought I would share my findings.
EDIT: Ok i fixed it so now the RAIN system detects the damage values, you have to set it up like this:
(red errors still show in console window, this time it’s vp_hitscanbullet script)May 8, 2022 at 9:01 am #37865I went ahead and put together a solution for the integration. No new scripts needed. No need to use any of the scripts that have been posted on this thread.
Make this change to DamageOnCollision.cs:
// DamageMessage tDamage = new DamageMessage() { damageGiver = tGiver, damageAmount = DamageAmount }; // aOtherCollider.gameObject.SendMessageUpwards("Damage", tDamage, SendMessageOptions.DontRequireReceiver); vp_DamageInfo tDamage = new vp_DamageInfo(DamageAmount, tGiver.transform, tGiver.transform, vp_DamageInfo.DamageType.Impact); aOtherCollider.gameObject.SendMessageUpwards("Damage", tDamage, SendMessageOptions.DontRequireReceiver);
Add this to DamageMessageReceiver.cs
public virtual void Damage(vp_DamageInfo aDamageMessage) { CurrentDamage += aDamageMessage.Damage; }
Add this to AIDamageReceiver.cs
public override void Damage(vp_DamageInfo aDamageMessage) { base.Damage(aDamageMessage); if ((HealthElement != null) && (aDamageMessage.Damage > 0)) { if ((aDamageMessage.OriginalSource != null) && (aDamageMessage.OriginalSource.IsChildOf(HealthElement.AI.Body.transform))) return; object tEnemy = HealthElement.AI.WorkingMemory.GetItem<object>("currentEnemy"); if (tEnemy == null) { HealthElement.AI.WorkingMemory.SetItem<CreatureAspect>("currentEnemy", FindAliveCreatureAspect(aDamageMessage.OriginalSource.gameObject)); } } }
May 8, 2022 at 10:23 am #37868It’s about time to hear from Prime. Great timing as I revisit my project using Sentio.
I will add this script to my project over the weekend and will update this thread.
May 9, 2022 at 8:52 am #37881Finally an actual legit integration, thanks for that, I will test this out and see how it works out.
May 10, 2022 at 12:17 pm #37886I was wondering, is this fix in the new update for RAIN or is it a custom fix for UFPS not included in RAIN packages?
May 11, 2022 at 7:42 pm #37890Here’s a Video Tutorial using Prime’s changes.
- This reply was modified 3 weeks, 5 days ago by redhawk.
May 11, 2022 at 8:09 pm #37892Nice of you to put together a tutorial I tried it out a few days ago, works perfectly like you displayed
May 11, 2022 at 8:13 pm #37893For Respawning - I put this script on the base of the UFPS Player
using UnityEngine; using System.Collections.Generic; using RAIN.Core; using RAIN.Serialization; using RAIN.Entities; using RAIN.Entities.Aspects; using Sentio.CreaturePack; public class ResetMe : MonoBehaviour { private vp_PlayerEventHandler m_Player = null; // should never be referenced directly public vp_PlayerEventHandler Player // lazy initialization of the event handler field { get { if (m_Player == null) m_Player = transform.GetComponent<vp_PlayerEventHandler>(); return m_Player; } } void LateUpdate () { if(Player.isActiveAndEnabled==true) SetAliveAspects(true); } public void SetAliveAspects(bool aIsAlive) { EntityRig[] tEntityRigs = GetComponentsInChildren<EntityRig>(); foreach (EntityRig tRig in tEntityRigs) { if (tRig == null) continue; IList<RAINAspect> tAspects = tRig.Entity.Aspects; foreach (CreatureAspect tCreatureAspect in tAspects) { tCreatureAspect.IsAlive = aIsAlive; } } } }
May 13, 2022 at 12:51 pm #37932nice respawn script, could be handy for lots of games I just noticed that if I put more then 1 sentio character in the scene the sentio characters attack each other and ignore me completely. They are marked as evil and the player marked as good, wondering if you have encountered this as well?
May 14, 2022 at 6:53 pm #37945Excellent work man! Ive had some discussions about this here and on VPs forums with Prime, very glad to see you sum it up perfectly, your videos are highly appreciated. Sentio is super cool, hoping for more gun slinging people soon from them, I love RT. Gaz.
PS this is the final link in the UFPS SENTIO chain, the world over will thank you and Rival Theory for this, Sentio is excellent.
- This reply was modified 3 weeks, 2 days ago by radiant.
May 15, 2022 at 4:51 am #37950I agree.. and thank you for sharing the video.
Now, I’m waiting to “bring your own character” type of sentio so we can use a different character to bring uniqueness of the game.
Cheers.
EM @ KING.NET -
AuthorPosts
You must be logged in to reply to this topic.