R0J0hound's Recent Forum Activity

  • It should be everything, at least for the system and official plugins. If anything doesn't then that would be a good reason for a bug report.

    For third party plugins it depends if the author implemented that part or not. I know for example most of my plugins don't impliment saving and loading, but I guess that's on me.

  • Maybe something like this to save if you just want to save positions.

    Set array size to (Sprite.count, 2, 1)

    For each Sprite

    --- set array at (loopindex, 0) to Sprite.x

    --- set array at (loopindex, 1) to Sprite.y

    Then maybe this to load:

    Array: for each X

    --- create Sprite at array.at(array.curx,0), array.at(array.curx,1) )

  • Just use multiple layouts. No need to deal with xml or databases.

  • You could use a global variable I suppose. I don't know when you make it jump, so for example every second you could do this.

    Global number move=0

    Every 1.0 seconds

    --- simulate jump

    --- set move to 1

    --- wait 0.5 seconds

    --- set move to 0

    Move = 1

    --- set velocityX to 100

  • I can't open your capx atm, but the every tick event is where you set the starting X,y, and velocities. In what I typed about it uses a object called cannon's position and angle.

  • The idea there is we need to keep the object's y position below the starting y. If the object goes above the sqrt in the equation will make the speed NaN because you can't get the square root of a negative number.

  • Here's one for the physics behavior:

    But you can do it without with simply:

    global number gravity=1000

    global number speed=200

    global number step=0.1

    global number vx=0

    global number vy=0

    global number x=0

    global number y=0

    every tick

    --- dot: destroy

    --- set x to cannon.x

    --- set y to cannon.y

    --- set vx to speed*cos(cannon.angle)

    --- set vy to speed*sin(cannon.angle)

    repeat 100 times

    --- add gravity*step to vy

    --- add vx*step to x

    --- add vy*step to y

    --- create dot at (x,y)

  • It looks like it stops working, or at least jumps, when it goes to just one touch. Maybe setting the oldtouch value when a touch is released would alleviate that. I think I addressed that in my original capx, but I haven't looked.

  • If you're not checking for performance with the sprite then disabling the collisions won't matter.

    Yeah, only the image size affects the amount of vram used. The size of the sprite doesn't matter. Also, there is no performance difference.

  • I wasn't aware there was a way to disable collisions. An "on collision" is basically a "is overlapping" with a trigger once. Collisions are only detected with a object if it either has the solid behavior or you use one of those events.

    The image size doesn't affect the performance. It just reduces the amount of vram used which can be important for mobile devices.

  • In 1 and 4 "this" is the current instance.

    In 2 "this" in the onCreate function is the current instance. It's set to a global variable so the instance can be referenced in that widow callback.

    In 3 self is used so the callback "errorFunc" can access the instance. Otherwise I think this would be the global window object.

    The following link probably is better help:

    http://javascriptissexy.com/understand- ... master-it/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From what I can tell the body is moved around directly and everything else: eyes, arms and legs point toward some target positions. I don't really see any physics other than the jump.

    This tutorial is relevant for the arms and legs I suppose. It's for construct classic but it explains it well, and all of it could be done in C2.