Method Say
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
Say(string)
Makes the hero say something. Useful for debugging, casting spells, and giving commands.
public float Say(string text)
Parameters
text
stringWhat to say
Returns
- float
Duration of the speech or spell cast time
Remarks
This method has multiple uses:
- Debugging: Print variable values and debug messages
- Spell Casting: Certain spells are cast by speaking command words
- Communication: Talk to other characters or party members
var enemy = FindNearestEnemy(10);
if (enemy != null)
Say($"Found enemy at distance {Vector3.Distance(transform.position, enemy.transform.position):F1}");
Say($"My health is {Health}/{MaxHealth} ({(Health * 100f / MaxHealth):F0}%)");
Say("Por Erd Sol");
See also SayTo(string, Transform) for targeting specific characters with spells or messages.