playMaker

Author Topic: Trigger Count  (Read 4188 times)

Sjones

  • Full Member
  • ***
  • Posts: 203
Trigger Count
« on: January 31, 2013, 01:35:57 AM »
Can anyone confirm that the trigger count action is working in the latest version of playmaker and 3.5.6 version of unity.

I havnt been able to get the trigger to work in the latest version of PM, however it was working in an old build, once I updated playmaker had trouble again.

using the bool option of the trigger count and moving the rigidbody mesh manually.

i havnt updated to 3.5.7 of unity yet, if someone confirms its working in that build will probably update.

thanks

Edit*
I have done further tests and it looks as if something was changed between version 1.4 and 1.4.4f3 of playmaker that is effecting the trigger count script.

On this note, I think there may of been a partial issue with 1.4, my initial thoughts was that it was a problem with unity, though with escalating severity in the later builds of playmaker it might not be down to unity.

I have been attempting to use multiple collision primitives as children to a mesh, the mesh itself has a rigidbody component, when creating instances of this setup from a prefab, I have to delete the existing rigidbody and then apply a new one (or just apply a new one if none exists) for the collision mesh - rigidbody collision detection.

only then will the trigger count bool (haven't tried the numeric value of the script) recognise any collisions.
if the rigidbody is kept from the prefab with no alteration then trigger count does not detect any collisions.
« Last Edit: January 31, 2013, 02:31:26 AM by Sjones »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger Count
« Reply #1 on: January 31, 2013, 04:46:54 AM »
Hi,

 I am might be blind, but I don't see any trigger count action, nor did I found a custom action on the forum.

 Could you tell me where you got this action?

bye,

 Jean

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Trigger Count
« Reply #2 on: January 31, 2013, 10:52:54 AM »
Hi jean, thank you for the reply, you are correct it is not in the latest build of playmaker.

it was created back in october last year from the date on the file, it could possibly be a custom action I made myself, though I do not remember doing so. (looks like an adaptation of the triggerevent script)

however after searching the forums here I have found no reference to it so I am not sure how I got it.

this means as its not in PM that its not a bug with the system.

I have attached the script and would appreciate it if anyone could test it / fix it, and as it looks like its not a standard action, feel free to use it if you can get it fixed.

sorry for the misunderstanding

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Trigger Count
« Reply #3 on: February 03, 2013, 01:56:27 PM »
It looks like there is a problem with the trigger event script that this one is based upon

http://hutonggames.com/playmakerforum/index.php?topic=3056.0

does this require a bug report within playmaker? if so can get onto that.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Trigger Count
« Reply #4 on: February 08, 2013, 02:16:51 AM »
Hi,

 no problem here, it's simply that you overlooked that fact that an action has to explicitly register the fsm to receive these events ( for performances reasons):

look at the official "TriggerEvent" action for a correct implementation.

so you need to add:

Code: [Select]
public override void Awake()
{

Fsm.HandleTriggerEnter = true;

Fsm.HandleTriggerExit = true;

}

bye,

 Jean