Forums › 💬 NodeCanvas › 🗨️ General Discussion › Implement two interfaces in action class › Reply To: Implement two interfaces in action class
Hey,
your speculation is right, the agent will be controlled complete with a NC-Behaviourtree. I want to make that move-action to end in success when waypoint arrived, retarget if agent is blocked and end with failure if waypoint is unreachable.
This action task will only be the first one of a series of Apex based behavior tasks. I plan to make:
– Patrol several points
– Run maxspeed to a point
– Flee from a point / a object
– Search an area around a starting point
– Follow a leading agent
– take Cover
– some kind of flocking behavior
You see that is a lot of stuff and therefore I suppose it will need a fast and direct integration of that Apex messaging for agent controlling. At the moment I’m not sure how to split up the tasks for efficient modularity – some parts like initializing, messaging and the basics moveToPoint, get new waypoint, steering etc. will be used in every behavior, other tasks will be used in just one single behavior.
Is it useful in this case, to create something like a base class for all this actions? Never done that before;-) ??
Anyway, here are the actual errors when I plug that interface in:
Assets/02-Scripts/NC-Actions/Apex/ApexMoveToPosition.cs(16,27): warning CS0108:NodeCanvas.Actions.ApexMoveToPosition.blackboard’ hides inherited member NodeCanvas.Task.blackboard’. Use the new keyword if hiding was intended
Assets/02-Scripts/NC-Actions/Apex/ApexMoveToPosition.cs(13,18): error CS0535: NodeCanvas.Actions.ApexMoveToPosition' does not implement interface memberApex.Services.IHandleMessage<Apex.Messages.UnitNavigationEventMessage>.Handle(Apex.Messages.UnitNavigationEventMessage)’
And something strange: During working I saw, that there are several _MonoManagers in my scene, seems that after a unity crash a new MonoManager is added, and old are hangin around too…
Allright, enough stuff, I’m working on it and I am curious about Your advice again 🙂
Cheers
