Zathan's Forum Posts

  • Are you adding "force" or "impulse"? seems like impulse would be the right choice in this case.

  • I have sprites that are 'cameras' with lineofsight in my levels, to detect the player. When there is just one camera in the layout, it's fine. The problem is when there is more instances of the camera...

    The detection if the player IS in line of sight works with all instances, but how can I make just the right instance of the camera detect that the player IS NOT in line of sight anymore? just inverting the condition "has line of sight" don't to the job for the right instance.

  • They way I've handled this is...might seem a bit of an overkill, but in my particular situation it worked fine. I have a pather object, which has the pathfinding behaviour - seperate from the real object I want to move. When I want to go someplace, the pather objects goes in that direction(NOTE: it is invisible and moves quite faster than the actual Object), updating its path frequently, and also leaving numbered nodes (set a var to nodes.cout + 1) on its trail on every now & then. Then I make the actual object follow the nodes (by updating its position by some pixels) always picking the lowest Node No, and destryoing each upon colliding with them. This way the pather can stop on every update, but as long as the actual object does not go faster than the pather, it would move quite smoothly.

    Hope this makes sense.

    CHeers

    Ha! Thank you for the answer, it helped a lot!

  • That's a hell of a topic

    Thank you oultrox and ashley!

  • Ashley , thank you for answering and posting the solution.

    Indeed, that was the problem! the rotation speed. since my enemies are fast, they needed a highger rotation that ended up solving the problem. or at least that's what I think and I'm seeing, you can look it by yourself at this .capx I made with the rotation fixed! so anyone who went into this problem could get this .capx and see that actually it has a solution:

    https://www.dropbox.com/s/wlbd7ugm4tch5 ... .capx?dl=0

    Also, I've implemented a LOS to see that you won't be actually seeing them rotating that fast because you could adjust it manually by setting rotating object to no in their pathfinding properties.

    and in this gif I'm showing the fact that my guys are following properly now. <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">!

    Thank you guys! you might want to pin this to the How do I FAQ. I didn't see something like this in that place.

    Looking at this latest gif a question came to me:

    How can we handle the guys entering in each other?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Bump!

  • Every time you recalculate the path, the object will want to stop (or at least slow down) whilst recalculation takes place. Try performing path updates less frequently, for a start. Also, when the object's view of the player is unobstructed by pathfinding blockers, there's no need to use the pathfinding anymore - you can start to use more dynamic movements instead.

    And yeah, I'd disable the sine behaviour for now until the basic movements are working.

    Yeah, I've tried that, but it cause bugs too..

    I think I've found a good solution, but I'm having problems to make this work. Instead of using the "move along path", I want to use a lerp to make the bot travel through the nodes. There is the expressions "NodeXAt" and "NodeYAt", but I couldn't make what I want.

    Can someone help me with this?

  • Do you guys have any tips for me?

    I'm trying to make a flying bot that pursue the player and kill it. It's a platform game.

    I made a test and it works, but i'm not sure that's the best way.

    In the test, i'm updating the bot path every 0.2s, since the destination (the player) is constantly moving. But the bot movements are still kind of strange. It's not smooth.

    And, of course, to make the bot movement more realistic, I was trying to put some sine too.. but looks like it conflicts with the pathfinding movement, causing even more problems.

  • Zathan

    Use the bone names, instead of the sprite names. The names can be seen if you click the hierarchy tab, or expand the timeline view in Spriter. in this case, in C2 change the name of the parent and child to "bone_000" and "bone_001", respectively.

    Ahh! That's it. So I need to reference the bone name... I'm really dumb hehe

    Thank you very much for the help.

    But, seriously, it would be awesome to have a formal tutorial on this subject. That's a really cool feature.

    Just one more thing... there is a place where I can download always the last release of the c2 plugin?

  • We will add this to the tutorial at some point but chances are the issue was just needing to know these actions are meant to be used every tick using the object names from Spriter. Try Every Tick - Override "yourBoneOrSpriteName" (the hame within Spriter) scale to 2. See if it works.

    Sorry, I really couldn't make it work <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    I made a .capx with this last test.. tried to make the 'foot' go towards the mouse keeping the animation at the same time. Not works.. <img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral">

    https://1drv.ms/u/s!Ai2wcz1Xix0ygbsJxah2BA_gyRF7xA

  • I apologize for the extremely late reply. The plugin has an Action under 'Override Animation' called 'Override Bones With IK', this does simple 2 bone IK to the target you specify. It would be up to you to tell it where to IK to.

    Hello, thanks for the reply!

    I tried the override bones with IK a few times before and one more time now, but without luck :I've been searching for tutorials too, but couldn't find any..

    Can you, please, show me how to achieve this?

    I think it would be awesome to have a tutorial in your site or youtube channel on this subject too!

  • This is just me guessing do you want something like if say the world was a cirlce and that our feet should plant itself on the ground no matter what angle viewing.

    then wasnt there like an orb gravity plugin ?

    Many games today have exactly the system I want.. like Uncharted, Assassin's Creed, etc.. but the major are 3D. A foot is never floating, is always on the ground and the animations (walking, running, etc) adapts to the ground.. the legs, even with the animation, adapts to make the movements more realistic.

    Here a video that is exactly what I want, but in 3D:

    Subscribe to Construct videos now

    Look how at the beggining the character with IK walk adapting to the surfaces.

  • So.. someone?

    I will make my question more simple.. how can I work with IK in c2? feet that adapt to the ground, etc..

    It can be done with Spriter? I'm really curious..

    lucid

  • Bumpy!

  • I guess you mean like this?

    https://youtu.be/45na21YFTwg?t=369

    Not at all <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    I don't want to blend animations, I want to blend animation with events. Like.. imagine a person walking on a rough terrain. The "animation" still always the same, but the feet and, of course, the entire legs are always adapting to where the person is steping.

    Probably have something to do with IK, but the animations must be influenced by code.. I don't know if Spriter have support for this.