Hi! I’m using Godot 4.3 with C# and I’ve run into this confusing error.
I am trying to create custom signals for my game, but I simply cannot emit them using EmitSignal(). Compiler just gives an error that EmitSignal() does not exist.
Code below:
using Godot;
using System;
using System.Collections.Generic;
public partial class AttackAction : Action
{
List<Damage> Damages = new();
[Signal]
public delegate void AttackHitEventHandler(int damage,bool allied);
public void Attack()
{
int CombinedDamage = 0;
foreach (var damage in Damages)
{
CombinedDamage += damage.Execute();
}
EmitSignal(SignalName.AttackHit, CombinedDamage, Damages[0].Source.Ally == Damages[0].Target.Ally);
}
}
I thought it might be missing some import, but every example in official 4.3 docimentation uses it just like that. Any ideas how to fix this?