0

Error starting Game Mode: "Trigger Attr Change: No target defined"

JSonMac 1 month ago in Game Creator updated by BV123 1 month ago 3

Hi there!

I'm working on a prototype using GC and the shooter, melee, stats and behaviour modules for some months now and yesterday this error started to came up everytime I start game mode and still persist:

Trigger Attr Change: No target defined
UnityEngine.Debug:LogError(Object, Object)
GameCreator.Stats.IgniterAttrChange:Start() (at Assets/Plugins/GameCreator/Stats/Mono/Igniters/IgniterAttrChange.cs:38)


I'm able to play it but I noticed that my AI enemy sometimes just forget about the player and release the melee target by itself so I think this error might be the reason this malfunction.

Any ideas about what could it be?

Unity version:
2019.4.9f1
Game Creator version:
1.1.9
+1

Hey, I would try the process of elimination. Clicking on the error in the console might highlight the offending object in the hierarchy. If it doesn't, I would try deleting everything Stat related in your scene and then test play without saving so you don't lose all your Stat work. If the problem goes away, then you know for sure.

Looking at the error, it would seem that a trigger/action is trying to change a stat variable on an object that doesn't exist. Maybe something is getting destroyed at runtime that an Action is still trying to change? I would look very closely at all the Triggers, Actions, Conditions, and Components that are Stat related in your scene.

And if the Stat error isn't related I would take a closer look at the enemy AI's behavior graph. Sorry if this isn't very helpful. It's just that if it's not the Stat error then it could be any number of things that could be causing your enemy AI to behave unexpectedly.

Thanks for reply!

I did what you suggested and found a trigger inside a enemy character object that was trying to access another object that I deleted previously. Funny that clicking on the error didn't highlight any object in the hierarchy...

I still didn't find the error that cause the AI losing the target to the player sometimes, and it's a random thing, really weird, but I'll keep looking into it.

Thanks again.

+1

Oh, before you go I had a thought. It's probably not the problem but if you're using Navigation with the enemy AI, you might want to look at the Nav Mesh Agent component that's added at runtime. I remember having problems with its default settings and my AI character would just stop for no reason. Adding a Nav Mesh Agent component to your enemy character before test playing will prevent GC from adding one for you and you can adjust its settings as you like.

Anyway, it was just a thought. Bye now! :-)