Forum rules - please read before posting.

Triggers & Parameters - Possible bug in 1.71.4

Unity Ver: 2019.2.4f1
AC Ver: 1.71.4

'ello,

I think I might have found my first AC bug! It's to do with triggers returning a parameter count of 1 when they shouldn't have any.

Here's what you do:

1) Create a trigger and fill its action list with some simple Dialogue:Play Speech
2) Have a script running which uses OnBeginActionList() and do something like print("Started: " + actionList.name + " which has " + actionList.parameters.Count + " parameters");

If you play now, when the trigger is run the print should inform you that an action list was started with zero parameters. That's correct.

But, if you then...

1) In the trigger tick 'Set collider as parameter'
2) Then untick 'Set collider as parameter'

Now if you play, it'll say the action list was started with a parameter count of 1, even though the parameter option was unticked in the trigger.

I'm not sure what is happening behind the scenes but this would suggest the trigger is retaining a parameter.

Comments

  • Unsure if the specific actions I'm using might have something to do with it but here's my setup incase;

  • edited June 2020

    Does the parameter override field appear in Actions once "Set collider as parameter?" is unchecked?

  • edited June 2020

    Hey Chris,

    I'm a little unsure what the parameter override field is.

    However, with "Set collider as parameter" checked this is what I see:

    And with it unchecked:

    In both these instances the action list registers as having a parameter.

  • Hard to classify exactly what this is, but the "correct" way to read the number of parameters is to instead use:

    actionList.NumParameters;
    

    This should return the correct value at all times.

  • Oooh, that's cool. Will use that. Thanks buddy.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.