Greetings i'm creating an enemy type and looking for input / thoughts on how to proceed with it.

In theory this is my goal:

Enemies will move around either on Navmesh or random through waypoints
When in range of player, they will chase the player until they touch them or until the player gets out of range.
Upon impact the player will flash or blink briefly and the enemy will stop for a few seconds allowing the player to escape.

Certain obstacles in the game can destroy these enemies. Ex: Enemy contacts spinning blades and enemy is destroyed.


So far I've been able to make the following systems but they aren't linked together. So they work individually but not together.

1. enemies move on navmesh or through premade waypoints. Working
2. Check player distance and chase (unable to make them stop when out of range though)

For some reason I cannot get them to change Player color, material, blink or any Render changes upon impact.

I've tried Tick, Trigger, Collision machines

Any suggestions as to how to link it all together?

Thank you
ORK user since 2014. Patron since 2018.
  • Is the machine responsible for changing the player color/material/whatever started? If not, make sure your game objects are set up correctly, e.g. collisions require colliders and at least one of them also having a non-kinematic rigidbody attached.

    In the schematic, make sure to use the correct game object and settings - e.g. using the actual object with the renderer or selecting the component scope to use all child objects.

    As for linking it all together, it's best to use object variables for this to exchange states between the schematics. E.g. an int variable, where a value of 0 would mean waypoint mode, 1 chase player, 2 stop, etc.
    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 did some testing, blink in ORK works fine

    In Makinom I get this error upon collision
    Makinom Color Change Fired
    UnityEngine.Debug:Log(Object)
    Makinom.Schematics.Nodes.UnityConsoleNode:Execute(Schematic)
    Makinom.Schematics.Schematic:ExecuteNextNode()
    Makinom.Schematics.Schematic:NodeFinished(Int32)
    Makinom.Schematics.Nodes.ChangeColorNode:Execute(Schematic)
    Makinom.Schematics.Schematic:ExecuteNextNode()
    Makinom.Schematics.Schematic:Start()
    Makinom.Schematics.CoreSchematic:PlaySchematic(IExecutionStarter, GameObject, GameObject, Boolean, MachineUpdateType, Int32)
    Makinom.Behaviours.BaseMachineComponent:StartMachine(Schematic, GameObject)
    Makinom.Behaviours.BaseMachineComponent:StartMachine(GameObject, VariableHandler)
    Makinom.Behaviours.CollisionMachineComponent:OnCollisionEnter(Collision)
    I've tried it with your suggestion to use All Child Objects, Single and every option in Scope.
    This error keeps appearing.

    Both the Enemy and Player have rigibody with IsKinematic disabled.

    The Player has a mesh render I just added thinking it would impact the outcome but with it on or off the error appears.

    I've tried many different ways even using the Set Property and also tried Change Material Color same error.

    Here is my current schematic - tried many different options
    https://vighorusgames.com/devpublic/changeColor.PNG


    I also tried using Ork to call the plugin and it get called but same error.
    ORK user since 2014. Patron since 2018.
  • Well, that's not an error, that's the output of a Unity Console node in your schematic :)

    Is the player set in Makinom? Otherwise the Player actor isn't available (i.e. no player game object), so you'd have to use the machine/starting object (whichever it is that should be blinking).
    And you should enable Fade Blue as well.
    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!
Sign In or Register to comment.