Every time I Add Event to the Fox’s ‘fox walk’ clip to SetSpeed to 0.4, I get the warning (red octagon with white exclamation mark) saying “‘Body’ AnimationEvent ‘SetSpeed’ has no receiver! Are you missing a component?”. The functionality still works but it fires the warning every frame kind of thing. When I take the event off, the warning goes away.
I believe this is referring to the SetSpeed method in your Attacker.cs script, do you have this method in your script?
If so, do you have this script component on each of your attackers?
If so, have you perhaps created this animation event for a defender animation also? You’ll recall that the Defender.cs script does not have a SetSpeed method.
Thanks Rob for the reply. I have everything set up as per the videos. The animation seems to be working correctly but I get the error that I specified and it repeats every second or frame (however it runs). The only thing I can see is that the Curve on each of the Fox animation clips is yellow (see image attached). I have removed everything from the Fox and reapplied following the videos about 15xs. The lizard works/looks fine. I’m going to ignore the error for now and move on.
Did you check the defenders to see if there was a rogue Animation Event calling the SetSpeed method, for which a Defender will not have a method for in the defender.cs script?
If you want to zip up the project files and share them with me via Google Drive / Dropbox (or equivalent) I will happily take a quick look for you.
Here’s a very quick way to rule out the problem, assuming there is only one copy of the defender.cs script in your project. If you add a method within defender.cs as follows;
public void SetSpeed(float speed)
{
// deliberately left empty
}
If you take a look at the Fox, then it’s Body child GameObject you’ll note that you have a duplicate Animator component. The Animator component should only be on the parent, e.g. the Fox.
Remove this component from the Body GameObject, run the game, problem gone.