R0J0hound's Recent Forum Activity

  • That should be the case. Maybe post a screenshot of the event.

  • Just do it with events. Give the robot three variables vx=0, vy=0, and gravityStrength=400. In the click event it shows how to set vx and vy from a speed of 200 and an angle of 45.

    Global number gravityDir=0

    for each robot

    --- set gravityDir to angle(robot.x, robot.y, planet.x, planet.y)

    --- robot: add self.gravityStrength*cos(gravityDir)*dt to vx

    --- robot: add self.gravityStrength*sin(gravityDir)*dt to vy

    --- robot: set postion to (self.x+self.vx*dt, self.y+self.vy*dt)

    --- robot: set angle to angle(0,0,self.vx,self.vy)

    on click

    --- create robot at (player.x, player.y)

    --- robot: set vx to 200*cos(45)

    --- robot: set vy to 200*sin(45)

  • To arrange the sprites like in your example you can do this:

    for each sprite

    --- set position to (lerp(100, 300, loopindex/(Sprite.count-1)), 400)

    100 if the leftmost x and 300 is the rightmost. 400 is the y.

  • I won’t be doing that.

  • Deformations can be done without webgl. I’ve done it before in plugins, it’s just not super fast.

    If you want to do deformations now, there are a few plugins that can be used.

    For one, there is the creature2d plugin. It does mesh deformations but you have to design them with the creature2d software. There may be another plugin for some other animation software as well.

    If you want to do the deformations manually with events. There is the custom draw and paster plugins. They both let you draw deformed quads. Combine multiple quads together and you can get some nice effects. The paster examples are a bit harder to find in the plugins topic.

    If neither of those float your boat then you can make your own plugin I suppose. The sky is the limit.

  • Ai can be many things. You’ll have to break it down in more detail what you want the enemy to do.

    By doing that you should be able to have a lot of simpler things you can figure out how to do easier.

    Then if you still get stuck you’ll have some more specific questions and be able to get more specific help.

    Anyways as broad a question as it is you could look into the pathfinder or line of sight behaviors as a start. But there is a lot more different ways to do ai.

  • There isn't any expressions to get the current effect parameters.

  • You could use a global layer to be DRY.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try the persist behavior. It makes things stay the same when you leave a layout and come back.

    Another idea is to just have the inventory on a layer that you keep hidden most of the time.

  • It's just a matter of saving the position of one of the objects to some variables and then setting the position of the objects to the other.

    global number tempx =0

    global number tempy = 0

    start of layout

    --- set tempx to sprite.x

    --- set tempy to sprite.y

    --- sprite: set position to (sprite2.x, sprite2.y)

    --- sprite2: set position to (tempx, tempy)

    For the example of swapping pieces around, i'd assume they are all instances of the same object type.

    global number tempx =0

    global number tempy = 0

    global number iid1=0

    global number iid2=0

    start of layout

    repeat 100 times

    --- set iid1 to int(random(sprite.count))

    --- set iid2 to int(random(sprite.count))

    ------ pick sprite instance iid1

    --------- set tempx to sprite.x

    --------- set tempy to sprite.y

    --------- sprite: set position to (sprite(iid2).x, sprite(iid2).y)

    ------ pick sprite instance iid1

    --------- sprite2: set position to (tempx, tempy)

  • Nice. Glad it helped

  • Could making it global and just hiding it/disabling it’s solid behavior when changing to another layout work?

    The idea is to just always keep it loaded to avoid the recreating overhead which is more significant due to the amount of tiles.