This topic contains 34 replies, has 5 voices, and was last updated by  darkeccho 1 week, 5 days ago.

Viewing 15 posts - 16 through 30 (of 35 total)
  • Author
    Posts
  • #37840

    darkeccho
    Participant

    oh i changed that over to Sentio.Necromancer, which didn’t cause an error :)

    #37841

    redhawk
    Participant

    cool. 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.

    #37842

    darkeccho
    Participant

    The 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.

    #37843

    darkeccho
    Participant

    Ok 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?

    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    #37849

    darkeccho
    Participant

    So 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)

    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    • This reply was modified 1 month ago by  darkeccho.
    #37865

    prime
    Keymaster

    I 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));
                    }
                }
            }
    #37868

    QUEdotCOM
    Participant

    It’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.

    #37881

    darkeccho
    Participant

    Finally an actual legit integration, thanks for that, I will test this out and see how it works out.

    #37886

    darkeccho
    Participant

    I was wondering, is this fix in the new update for RAIN or is it a custom fix for UFPS not included in RAIN packages?

    #37890

    redhawk
    Participant

    Here’s a Video Tutorial using Prime’s changes.

    • This reply was modified 3 weeks, 5 days ago by  redhawk.
    #37892

    darkeccho
    Participant

    Nice of you to put together a tutorial :) I tried it out a few days ago, works perfectly like you displayed

    #37893

    redhawk
    Participant

    For 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;
    			}
    		}
    	}
    }
    #37932

    darkeccho
    Participant

    nice 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?

    #37945

    radiant
    Participant

    Excellent 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.
    #37950

    QUEdotCOM
    Participant

    I 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

Viewing 15 posts - 16 through 30 (of 35 total)

You must be logged in to reply to this topic.