hi mastahg, i met a problem when trying to make dragoon elusive jump to a specified direction when received an echo message,
Code:
private void GamelogManager_EchoRecevied(object sender, ChatEventArgs e)
{
if (e.ChatLogEntry.Contents.StartsWith("@escape", StringComparison.InvariantCultureIgnoreCase))
{
var cameraheading = Core.Memory.Read<float>(CameraManager.CameraPtr + 0x130);
if (e.ChatLogEntry.Contents.Contains("invert")) cameraheading += 3.1415926f;
//character heading offset: +0xB0
Core.Memory.Write(Core.Me.Pointer + 0xB0, cameraheading);
ActionManager.DoAction(@"Elusive Jump", null);
}
}
this working in most situations, but i found when many spells is using by CR simultaneously, it sometimes can not jump to the proper direction. i guess it is because the gamelog event and treeroot are in different threads.
how can i make sure a memory value is my expected value before greymagic's calls get executed?