Re: Flownode Access AND AnimationSequence in C#

#2
Flowgraph isn't completely exposed yet to C#, but what you can try is starting UI Actions from C# instead of the normal Flowgraph actions. For example to start a UI Action called "MyAction" you could use the following code:

Code: Select all

IUIAction action = Global.gEnv.pFlashUI.GetUIAction("MyAction");
Global.gEnv.pFlashUI.GetUIActionManager().EnableAction(action, true);
var arguments = new SUIArguments();
Global.gEnv.pFlashUI.GetUIActionManager().StartAction(action, arguments);
Keep in mind that you have to add the following at the top of your file to be able to use these classes.

Code: Select all

using CryEngine.Common;

Re: Flownode Access AND AnimationSequence in C#

#3
Thank you cry-miron!
You can realy access the flowgraph in UI Action like you explain but i went into some problems like switching a camera or the Entity Connection are lost in Flowgraph after reload a level in sandbox.
Also if i start a Level in GameMode starting a UI Action from c# my Screen freeze and i have the mouse cursor on top until i press ESC.
I don't know why these things are happen and so i have maked an deeper search and found out other solutions to access any Flowgraph in C# witch i will explain in my next Post.
Also i have a Solution for playing Animation Sequence in C#!

Who is online

Users browsing this forum: No registered users and 1 guest