I want to input IDLE as the animationstate, and 3 seconds as the float, but I can't seem to be able to reach this function using Makinom (or ORK!) for some reason. I only get 'Method not found', 'Property not found' and 'Field not Found' errors in all of my attempts.
I'm guessing there's something unique about this that I'm missing, but I'm not quite sure how I'm supposed to set it up.
That'd be a Call Function node, but since Makinom doesn't now/supports the enum AnimationState, it can't find the method.
I'll look into it if it's possible to somehow get the method and just using an int instead of the enum. Otherwise you'd need to write a custom node.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
No compiler errors, but no effect either when I use the custom node in a makinom machine. To be fair, I have no idea if the lines I used are the proper ones for accessing the function.
Here, I fixed and extended it for better use :) You should be now able to change the state, time and used object in the node.
using UnityEngine; using Makinom; using System.Collections.Generic;
namespace Makinom.Schematics.Nodes { [EditorHelp("Change Animation State", "Changes the animation state.", "")] [NodeInfo("Custom/Platformer Pro")] public class ChangeAnimationStateNode : BaseSchematicNode { public PlatformerPro.AnimationState state = PlatformerPro.AnimationState.None;
public float time = 3;
[EditorInfo(separator=true, titleLabel="Object")] public SchematicObjectSelection onObject = new SchematicObjectSelection();
public ChangeAnimationStateNode() {
}
public override void Execute(Schematic schematic) { List<GameObject> list = this.onObject.GetObjects(schematic);
public override string GetNodeDetails() { return "Node info text"; }
public override Color EditorColor { get{ return Maki.EditorSettings.baseNodeColor;} } } }
Also, support for enum values is coming in the next Makinom update.
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Assets/Makinom_Events/Custom_Nodes/ChangeAnimationStateNode.cs(31,72): error CS0103: The name `targetObject' does not exist in the current context
So I changed targetObject to onObject, but now I'm running into:
Assets/Makinom_Events/Custom_Nodes/ChangeAnimationStateNode.cs(31,81): error CS1061: Type `Makinom.Schematics.SchematicObjectSelection' does not contain a definition for `GetComponent' and no extension method `GetComponent' of type `Makinom.Schematics.SchematicObjectSelection' could be found (are you missing a using directive or an assembly reference?)
Yep, that's what I get for copy-pasting stuff :) I've edited the code, should work now.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'll look into it if it's possible to somehow get the method and just using an int instead of the enum. Otherwise you'd need to write a custom node.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
http://pastebin.com/0EgUL4ct
No compiler errors, but no effect either when I use the custom node in a makinom machine. To be fair, I have no idea if the lines I used are the proper ones for accessing the function.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
You should be now able to change the state, time and used object in the node.
using UnityEngine;
using Makinom;
using System.Collections.Generic;
namespace Makinom.Schematics.Nodes
{
[EditorHelp("Change Animation State", "Changes the animation state.", "")]
[NodeInfo("Custom/Platformer Pro")]
public class ChangeAnimationStateNode : BaseSchematicNode
{
public PlatformerPro.AnimationState state = PlatformerPro.AnimationState.None;
public float time = 3;
[EditorInfo(separator=true, titleLabel="Object")]
public SchematicObjectSelection onObject = new SchematicObjectSelection();
public ChangeAnimationStateNode()
{
}
public override void Execute(Schematic schematic)
{
List<GameObject> list = this.onObject.GetObjects(schematic);
for(int i = 0; i < list.Count; i++)
{
if(list[i] != null)
{
PlatformerPro.Character comp = list[i].GetComponent<PlatformerPro.Character>();
if(comp != null)
{
comp.ForceAnimation(this.state, this.time);
}
}
}
Maki.Pooling.GameObjectLists.Add(list);
schematic.NodeFinished(this.next);
}
public override string GetNodeDetails()
{
return "Node info text";
}
public override Color EditorColor
{
get{ return Maki.EditorSettings.baseNodeColor;}
}
}
}
Also, support for enum values is coming in the next Makinom update.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I do get an error though: So I changed targetObject to onObject, but now I'm running into:
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
I've edited the code, should work now.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames