edited January 2017 in Makinom Support
First time playing with the waypoints in Makinom. Liking the physical lines connecting each points together. I have a gameobject with a waypoint componenent, and two waypoints on screen, point 0 and point 1.
On my enemy I have a tick schematic. In the schematic, there is just a follow path node. Is it possible to make the enemy go to point 0, pause for a bit, go to point 1, pause for a bit, go to point 0, and repeat?
Post edited by Shadow_Fire on
  • Hm, I don't think that's currently possible - but sounds like a good feature :)
    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!
  • edited January 2017
    It is :)
    I am in need of your expertise/advice on a little problem I am having. I have two invisible cubes to act as targets for the enemy. How would you do this, in makinom, as the enemy's movement, to make the enemy go back and forth from each cube(pausing at each cube real quick to do its idle animation), and when the player enter a big invisible collider surrounding the area the enemy is in, it will stop it's movement and rush at the player. The moment the player exit the collider, the enemy will stop and go it's merry way back to it's regular patrol.
    I have tried many methods, but they all seem to have some weird effects I don't really want(And I feel like they aren't the most optimal ways of doing it).
    So I thought, what better way than to ask you, who know the ins and outs of Makinom, for the most optimize and efficient way of doing it.
    I would really appreciate it!
    Post edited by Shadow_Fire on
  • edited January 2017
    Hm, probably best to do this using selected data to store the current target of the enemy, using Object data origin on the enemy.

    You'd use 3 schematics/machines for this:

    Trigger machine (trigger enter) > set the player's game object as selected data of the enemy (e.g. using the key target), eventually storing the previous target in another selected data (e.g. lastTarget) if you want to go back to it instead of a fixed target

    Trigger machine (trigger exit) > set the target to either lastTarget or one of the cubes

    Tick machine (on the enemy) > handling movement to target, doing what you need at the target and switch target (if not targeting the player):
    - if target is empty, select one of the cubes
    - move to target
    - when at target (distance checks), do your thing (e.g. playing an animation), if target is not the player, switch to the other cube
    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!
  • edited January 2017
    Ohh that sounds like a fantastic way of doing it. I never thought to do it that way.

    Well, I managed to do as you said, and I gotta tell you, your method is a lot cleaner than what I came up with, and I feel like it runs a lot better too.

    There is just one tiiny problem. The problem is that while it's doing it's animation at a cube, I enabled the wait button to let it finish it's animation first before switching the target to the other cube. This means that while it's performing it, if my player enters the trigger, the enemy will not chase me until the animation is over. This is because even though my player enter the trigger and set target to the player, the enemy will not check the selected data yet because the wait is still not over. So if the enemy's idle is 5 or 10 second longs, by the time the idle is over, and my enemy starts checking again, my player will be long gone. Coincidentally, this seems like something I would want on a different enemy and will surely do so, but for this enemy I want the enemy to always be alert even when he's idling. I got a couple of ideas I can try, but I want to see if you know of a better way to do it first. :)



    Post edited by Shadow_Fire on
  • Maybe you could check with AnimationIsPlaying step when the player enters the collider and in that case you stop it (PlayAnimation with Stop settings)....
    I hope it helps. ^^
  • edited January 2017
    I thought that was going to work but alas, the enemy just froze but the timer is still ongoing. Great idea though!

    Edit : Well, I manage to do it by disabling the wait in the animation node, and adding a float random node with float var waitTime next to it. I then add a check variable node counter to see if counter is greater than or equal to waitTime. If it is, go to cube, and if it is not, change counter by 0.1, and add a wait node(0.1) next to it. After the wait node comes the selected game objects contain node which will check to see if target is the player. If not, loop back to check variable node(counter). If it is the player, success is linked to nothing and in the next update the tick will go back to the beginning and start chasing the player.

    This works great for now, but just making sure GiL or anyone else got a better idea :)
    Post edited by Shadow_Fire on
  • You could also just stop the animation and start moving the enemy toward the player in the trigger enter schematic. The tick schematic should catch on after the wait time, since the target was changed :)
    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!
  • Ohhh that makes sense. I'll try that. Super thanks to you, Gil.
  • edited January 2017
    GiL, I think there's a bug in the Rotate To node. For example, I just made a simple test tick schematic movement which consist of

    Rotate To(to cube) --> Change Position(To Cube)

    I want the enemy to turn towards the cube before moving towards it.

    In the rotate to node, if I enabled the fade rotation and put the fading time to anything more than 0.4 and enabled wait time, it will turn towards the enemy before moving towards it correctly. But if I disabled the wait button, the rotate node will no longer work. Also, even if I enabled the wait button, if I make the fading time less than 0.4, the node will also stop working. Disabling the whole fading option will also make the node stop working.
    Post edited by Shadow_Fire on
  • Can't confirm that - rotating as expected in my tests, can you send me your schematic?
    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!
  • edited January 2017
    That's weird. Now, everything works as expected on the fading rotation.

    But I still have a problem remaining. I did as you said and make the two cubes the target of the enemy. The enemy goes up to one cube, idle, rotate to the other cube, move, idle, rotate, repeat.

    The problem is that when the enemy is in the middle of walking to a cube and I enter the trigger, thus making the target the player, the enemy will chase the player but it will not rotate to the player. But if I enter the trigger while the enemy is idling, it will rotate correctly to the player before it begins chasing. Also, the moment I step out of the trigger and make the target a cube, the enemy is supposed to rotate to it first before moving. Instead, it just moves automatically to it without rotating.

    I checked and checked the schematic but still couldnt find what was wrong with it. I suspect maybe the change position node is overriding the rotate to node?
    I tested it without the change position node and it worked correctly. While I am out of the trigger, the enemy will turn to face a cube. The moment I enter it, the enemy turns to face me. I jump over to the other side, it turns to that side to face me. I get off the trigger, it turns back to face the cube. That means that I set up the rotation correctly in the schematic. It's only when I add the change position nodes that it all went haywire :)
    All of my change position nodes are done with the wait button disabled.

    EDIT : Yepp, I think that it's something to do with Makinom because I created the same enemy movement in Ork and everything works great in it.
    Post edited by Shadow_Fire on
  • If the rotation node isn't waiting to be finished, the movement node (e.g. if facing direction while moving is enabled) will naturally override this. Otherwise I'd need your schematics for testing (or even better, a simple test project) :)
    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!
  • In the ork's rotate to node, I didn't enabled the wait button but it still works though :)
    I'll strip down my project and will send it to you.
  • Sent you a fixed schematic that should work.

    For others:
    Moving (e.g. Change Position) and rotating (e.g. Rotate To) can interfere with each other. The fix in this case is to add a Stop Movement node before Rotate To, as the schematic was otherwise always moving the machine object.
    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.