Ok, I modified the Trigger Event with some code from the new Send Event action. It's dirty but it does the trick. Require you to set the collider to a variable and then to reuse that variable as the target.
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.
// Modified by Studio Interrupt
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Physics)]
[Tooltip("Detect collisions with a Tagged trigger.\nNOTE: TRIGGER ENTER, TRIGGER STAY, and TRIGGER EXIT are sent automatically when objects collide with ANY trigger. Use this action to send custom events when colliding with a particular Tag.")]
public class TriggerEventToCollider : FsmStateAction
{
public TriggerType trigger;
[UIHint(UIHint.Tag)]
public FsmString collideTag;
public FsmEvent sendEvent;
[UIHint(UIHint.Variable)]
public FsmGameObject storeCollider;
//public FsmBool sendToCollider;
public FsmEventTarget eventTarget;
public override void Reset()
{
trigger = TriggerType.OnTriggerEnter;
collideTag = "Untagged";
sendEvent = null;
storeCollider = null;
//sendToCollider = false;
}
void StoreCollisionInfo(Collider collisionInfo)
{
storeCollider.Value = collisionInfo.gameObject;
}
public override void DoTriggerEnter(Collider other)
{
if (trigger == TriggerType.OnTriggerEnter)
{
if (other.gameObject.tag == collideTag.Value)
{
StoreCollisionInfo(other);
//Fsm.Event(sendEvent);
Fsm.Event(eventTarget, sendEvent);
}
}
}
public override void DoTriggerStay(Collider other)
{
if (trigger == TriggerType.OnTriggerStay)
{
if (other.gameObject.tag == collideTag.Value)
{
StoreCollisionInfo(other);
//Fsm.Event(sendEvent);
Fsm.Event(eventTarget, sendEvent);
}
}
}
public override void DoTriggerExit(Collider other)
{
if (trigger == TriggerType.OnTriggerExit)
{
if (other.gameObject.tag == collideTag.Value)
{
StoreCollisionInfo(other);
//Fsm.Event(sendEvent);
Fsm.Event(eventTarget, sendEvent);
}
}
}
public override string ErrorCheck()
{
return ActionHelpers.CheckOwnerPhysicsSetup(Owner);
}
}
}