R0J0hound's Forum Posts

  • trippy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If for example full length is 200 then just always set the length to this:

    200 * health/100

    Or change 200 to whatever you want the max length to be.

  • The simplest way I have found is to decompose the spline path into a polyline and move along that line.

    Here I made it calculate the polyline as needed.

    /examples%209/catmullrom_constant_speed.capx

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

    Note: It only works with positive speeds atm.

  • It will work on a moving object.

    Mouse.X-Sprite.X gives you the x position relative to the Sprite, same for the y.

    With the hotspot of the sprite set to "top left" you will get values between 0-50 for x and y.

    If all you want is the direction from the mouse to the center of the Sprite then you can use the angle() expression to get the angle:

    angle(Mouse.X, Mouse.Y, Sprite.X, Sprite.Y)

    With the physics behavior the angle expression isn't even needed as you can apply impulse toward a position.

    http://dl.dropbox.com/u/5426011/examples%208/kick.capx

  • The value <varies> basically just informs you that all the instances of that object don't have the same value. As a default when adding the variables you can set "rate" to 1 and "offset" to 0.

  • You can calculate it with the difference between the Mouse and Sprite locations.

    +On clicked on Sprite

    -set x_on_sprite to Mouse.X-Sprite.X

    -set y_on_sprite to Mouse.Y-Sprite.Y

    This is dependent on the Sprite's hotspot. If the hotspot is centered then x_on_sprite and y_on_sprite will be -25 to 25, but if the hotspot is top_left then they will be from 0 to 50.

  • I don't have a multi-touch device so I can't fully test this but here is an idea of how to distinguish between multiple touches. It uses sprites to keep track of the positions of the touches and what objects were initially touched.

    http://dl.dropbox.com/u/5426011/examples%208/multitouch.capx

    Edit: Since I can't test it I can't be sure but you may need to add a "for each Sprite" condition to the top of event 4.

  • Use can use the change in the mouse position to change the angle.

    ex:

    always:

    -add MouseX-global('oldmousex') to camera_angle_x

    -set global oldmousex to MouseX

    Then just plug it in to the rotation formula.

  • In your Create method save a reference to the new object you just created to a variable.

    self.spr = SOL.spr[0]

    Then in your update method you can access the sprite with "self.spr".

    self.spr.x += self.velx

  • It appears that the bug is because the collision polygon for the halfpipe is concave. According to this the Box2d engine needs the collision polygons to be convex to function correctly.

  • It wouldn't be an issue with the texture setter plugin. In the past I've seen objects not getting pasted into the canvas at the start of the layout. You could try a slight delay by using "compare time equal to 10" instead of "start of layout".

  • There is always a pattern with random number generators. Construct uses http://en.wikipedia.org/wiki/Mersenne_twister to generate random numbers so the pattern is quite long and shouldn't be noticeable.

    Can you give an example of a noticeable pattern?

  • The plugin has the expression "imageUrl" which stores the entire contents of the canvas as a png in base64 which you can copy paste into another browser window to view. You should be able to use the string returned by imageUrl with the plugin "load image from url" but saving the file to some server space is beyond my knowledge as I haven't dabbled with that aspect of the internet yet.

  • Hi I would like make a 1945 Game based on the C2 example but don't know where to start.

    How far have you gotten? Do you have a wip cap? I mean you should be able to make some sort of start.

    If not I think you're going at learning Construct the wrong way by learning how to compile it from the c source code. What kind of meaningful fixes/upgrades to the source code can you do if you don't know how to use the program?