R0J0hound's Recent Forum Activity

  • How are you doing the ragdoll, as in how is it setup? Any answer depends on that.

  • Variables that are common to all types in a family don't become family variables. To make it a family variable you'd have to create another family variable with a different name, then go through your events and change them to ref the family var instead of the old one. Finally you can delete the old vars and rename the family one to what you want.

    Construct Classic kind of used the common variable idea instead, but it had issues.

    Not being able to add or remove stuff from objects or families with events is a design choice as it simplifies the number of bad situations to work around. Both for C2 itself and for the user.

    If you could, switching factions is one thing you could use it for, but even though it doesn't you can still do switching factions in a different way.

  • You could try this plugin:

    It probably can be used to do what you want.

    Or you could implement pathfinding in just events. Here's my latest attempt using a hex grid. It actually should work if you change the hexagons to squares and position them on a grid. You just need to tweak the collision polygon into a square with beveled corners so diagonal cells won't be used.

  • Aher0

    Here's the capx:

    https://dl.dropboxusercontent.com/u/542 ... imple.capx

    The motion is jarring at times but the players run back and forth trying to kick the ball to their goal.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The idea should work. You can calculate the angle from the ball to the goal with the angle() expression and then calculate a position behind the ball to hit it to the goal with this:

    X+radius*cos(ang)

    Y+radius*sin(ang)

    This is basically all the trig you need for games. For x and y use the ball's position in this case.

    So with this you'd move to that position then to the ball. The next issue to address is the car can hit the ball accidentally when moving to that position. To fix it you'd need to move left or right of the ball first.

    At this point it becomes a bit tedious to describe but a picture would help a lot.

    Basically

    Angle2ball is from the player to the ball

    Angle2goal is from the ball to the goal

    If both angles are Within 90 degrees of each other then move to the point behind the ball

    Otherwise

    If clockwise go to left point

    If counterclockwise go to the right.

    I got it working in a capx but I can't post it for a day or so.

    Here are the points:

    Behind ball

    Ball.X+radius*cos(angle2goal+180)

    Ball.y+radius*sin(angle2goal+180)

    Left point. Right can be found by making 90 positive

    Ball.X+radius*cos(angle2ball-90)

    Ball.Y+radius*sin(angle2ball-90)

    The radius can be whatever looks good. Also I was able to get a more pleasing result by using 135 instead of 90 for the left and right points. I apologize this doesn't cover exactly how to make it work but it should be good enough to get the idea across.

  • Ah, true. I missed that forward momentum bit.

  • irina

    If you scale the crossword by a factor "scale" you could do this:

    crosswordgrid: set size to (self.width*scale, self.height*scale)

    letter: set x to (letter.x - puzzlegrid.x)*scale + puzzlegrid.x

    letter: set y to (letter.y - puzzlegrid.y)*scale + puzzlegrid.y

  • You could just scale the layer the crossword is on.

  • The one formula to know for motion is:

    speed*time=distance

    Take the red bullet as and example. You know the time (1 second) and the distance (90 degrees). so the equation is:

    speed*1 = 90

    You want to know the speed of the rotation so isolate speed on one side and we get:

    speed = 90/1

    or

    speed =90

    then you can do the motion with an event like:

    every tick:

    --- rotate red 90*dt degrees counter-clockwise

    --- rotate green 40*dt degrees counter-clockwise

    --- rotate blue 70/2*dt degrees counter-clockwise

    My next question is do you want the bullets to continue turning after that of just continue straight?

    If continue staight use "rotate toward angle" instead.

  • Probably not. The ragdoll bit is doable with the physics behavior and adding joints between the limbs with events. Before that you could use Spriter or Spine to create the controlled animations. Both have plugins I believe.

    I know little about either since I'm not so much of an art guy, but presumably you'd disable that and enable the physics to cause a ragdoll effect.

    Edit:

    Looking at the spriter plugin it looks like you'll have to do a bit more. You can access "action points" from spriter animations so the best you can do is put a lot of those in the animation, and then when you want it to ragdoll you'd create a bunch of sprites in position of the limbs by using the action points as a guide.

  • The runtime itself can be modified since its c++ source is available on sourceforge. All the runtimes are already pre-built in a folder dx9.exe, app.exe, ... Etc.

  • it's very similar to how c2 does it. The exe is the runtime and everything else: plugins, events, layouts and images are added as data in a format the runtime can readily use. So no it's not really possible to do what you want as the data is specific to the runtime.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound