SoldjahBoy's Recent Forum Activity

  • The problem is that in your logic, you have told the variable to change based on it's condition... but it is changing the variable several times in the single event because it's processing your code in-line. You need to have some way of changing the variables in a more controlled way. Currently if the variable is "left" it changes to "right" but is then immediately pocessed from "right" to something else. Maybe adding a "wait 0 seconds" after each state change might work... otherwise you need to break down your state change engine to be more controlled over the variable adjustments.

    ~Sol

  • > How are you creating the ragdoll parts and joints? It could be a case of the code not processing all in the same tick, and therefore the joints aren't positioning correctly (because your ragdoll is spawned already in motion?). You can try spawning and creating the joints for your ragdoll using a Function, which should give a more solid result. The function will process the creation and pinning of the ragdoll itself in a more precise way, since all of the function code *should* run all at the same tick.

    >

    > ~Sol

    >

    I have to thank you buddy

    I solved the problem because of you i used the wait action before i apply the revolute joint because as you said its was spawned in motion

    I really appreciate your help tnx.

    No problem at all!

    ~Sol

  • Hi thank you. I want to use values because i use many animations on my player. I have walking , walking shoting, shoting idle, running , running shoting , jumping , jumping shoting, crawl, and so on and it seems too complicated use arrows.

    Makes sense, but you can use the arrow keys to simply set a variable (instance or global, whatever suits) just to get a value for the direction. Use this in your comparison event as a flag/trigger for current direction.

    It would however be easier, as suggested by others, to make a variable for curX and curY, and compare to another set of variables like oldX and oldY. This will tell you which direction you are moving and/or facing.

    ~Sol

  • Poxnixles

    I messaged Quazi to ask if he would mind updating the links in his tutorial. I was trying to cut down my project that I made using IK chains so I could send it to you, but it seems like too much work to get it all working correctly... it would be faster to remake it all as an example - but Quazi's tutorial is even easier if he has the reference links there.

    Will give him a few days and see what happens... if he can't or doesn't want to fix the links I will try to remake a simple example.

    ~Sol

  • How are you creating the ragdoll parts and joints? It could be a case of the code not processing all in the same tick, and therefore the joints aren't positioning correctly (because your ragdoll is spawned already in motion?). You can try spawning and creating the joints for your ragdoll using a Function, which should give a more solid result. The function will process the creation and pinning of the ragdoll itself in a more precise way, since all of the function code *should* run all at the same tick.

    ~Sol

  • Is there some reason you don't want to use triggers like "is pressing left" to set your animations? It sounds like you're trying to make it hard on yourself for no purpose.

    X position is always going to be positive unless you have unbounded scrolling enabled... 0 is left side of the layout and it only counts up as you move to the right. This is how coordinates work. If you don't want to use the supported triggers for simple actions, then you will need to make some variables that check the position of the player every tick - then compare those values to see if the player moved left or moved right, and set your animations accordingly.

    Honestly though, unless you have some unavoidable necessity to NOT use "is pressing left" (or right) then I would just use those triggers... that's why they're there.

    ~Sol

  • The only way to do this is to export it to NWjs so it can run independently of your system browser. HTML5 needs at least *some* kind of browser to run, so NWjs will encapsulate your game and allow it to run "offline".

    ~Sol

  • You should check out some of Quazi's tutorials on inverse kinematics... IK chains.

    This makes a really nice ragdoll and uses the many pieces of sprites to combine into one object.

    *EDIT*

    I just realised all of the tutorial images and links are broken thanks to Dropbox changes to public folder... however it's all described in the text and the images and examples are not required. If you get stuck with it let me know, I have made some IK chains in another project and can possibly help or elaborate on something if you need help.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, I have found a solution that seems to work pretty well. I will do my best to explain in simple terms/method.

    First I have a main "player" that I move around with 8 directions behaviour. You can use whatever movement method you like.

    Secondly I have a "node" sprite and "allies" sprites (which are to follow the player).

    The "node" sprite has the behaviours of BOID (original boids not rex boids), as well as line of sight and custom movement. The "allies" have pathfinding behaviour only.

    So I make a node for every instance of the allies (when ally is created, make node as well and pair together with instance variable for some kind of ID system - you can use UID if you like). The "nodes" are set to boid behaviour to flock with the other node instances, and target/destination to the main player, and the "allies" are set to path find to the node that belongs to their specific instance.

    This works really well to simply pathfind to the location of the boid and avoid stacking up on top of each other. I will explain now the purpose of custom movement and line of sight...

    I discovered that, when I walked into a box of solids (walls to make a room) that some boids would be inside the walls or on the wrong side of the wall to the player - causing the allies to pathfind to the incorrect place. I use the custom movement behaviour so if the boid node is overlapping a solid object (wall) then it will push out at angle towards the player. The line of sight is used as a correction to this because sometimes the boid will still push at some weird angle and through the wrong side of the solids (because the boid behaviour is trying to maintain the constraints you provide to it) so i check if line of sight is not available to simply set the node to be at player.x player.y, then the boid movement will take over for it again since it has line of sight once more.

    If this is too confusing to follow I can make an example that demonstrates this - but I think I explained in simple terms how it will work.

    ~Sol

  • You can also use BOIDS behaviour and use that to "flock" your entities. They will perhaps overlap, but quickly adjust themselves to be more in a "loose group" depending on the settings you put into the behaviour.

    You can get the original BOIDS behaviour HERE

    You can get Rex Rainbow's version of BOIDS behaviour HERE

    Each behaviour listed above works slightly differently. Rex has a bit more control but I find slightly harder to use (which usually comes with having more control).

    ~Sol

  • This is really useful for cross platforms, thank you very much for this!

    No problem at all. I'm glad someone has found it useful!

    ~Sol

  • Hi guys,

    I made a little test project to allow a canvas to actually resize to fit ANY screen resolution, on the fly. The red squares will find the corners of the canvas and move to them. I set them to move with lerp so you can see it in action. Notice the sqaures do not scale as the size of the layout/canvas is adjusted.

    I did this, mainly to tackle problems I'm personally having with making projects that would suit any device (fullscreen) - while not forcing an aspect ratio or orientation.

    I wanted to build something that would dynamically reposition itself on any device, any resolution, any aspect.

    Key factors in this project are to set your scaling method to scale outer (I think scale inner works as well), and to set to unbounded scrolling. Every object is then placed using ViewportLeft,ViewportRight,ViewportBottom,ViewportTop (which you could simplify by tracking those with some global variables or something).

    Again, I just made this to solve one of my own issues, but thought it may be useful for some other people to help with this annoying issue. You could also incorporate a scale modifier if you wanted to maintain a given scale for your objects.

    LINK: https://www.dropbox.com/s/gg2lzx8np5u5lho/CANVAS_RESCALER.capx?dl=0

    *EDIT*

    Realised I had RexRandom plugin in the project for some reason. I was messing with some other stuff and forgot to remove it. Should be a lot more user-friendly now. Sorry about that!

    ~Sol

SoldjahBoy's avatar

SoldjahBoy

Member since 2 Apr, 2008

Twitter
SoldjahBoy has 3 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies