LittleStain's Forum Posts

  • Like this? (use spacebar to add to thermometer)

    thermometer

    This is done with a simple tiled background and one set height on spacebar released event.

  • (screenwidth/(numberofenemies+1))*multiplier

    then you should add 1 to the multiplier for each enemy to get the x-coordinates.

  • would 2 enemies not need to be at 1/3 and 2/3?

    that would seem more logical.

  • system every tick - spritefont set text: "score: "&SCORE

    in which SCORE is the name of the global variable holding the score.

    I'm not sure about the second question, but you probably are setting the letter width, so not all letters have the same width. an I has less width than a W. On the spritesheet for the spritefont all letters have the same width.

  • I'm not sure what you mean by masking, but I think you should look into blendmodes. There's an example shipped with C2, which you can find in the new project dialog.

  • you could set the animations based on angle of movement.

    if angle is between 45 and 135 set animation to front.

    if angle is between 135 and 225 set animation to side and set mirrored..

    etcetera..

  • compare the mouse position to the player position.

    if you really want to rotate the sprite just set it's angle : angle(sprite.x,sprite.y,mouse.x,mouse.y)

    if you want to mirror the sprite depending on mouse.x

    system compare two values: mouse.x > player.x

    if you only want to do it while moving add a condition for is moving and set the animation based on the destination.

    Everything is possible, but because it's unclear to me what you are expecting I'll leave it at these three examples.

  • There is a move to mouse example when you click new project in Construct 2, but you could also use the third party plugin MoveTo you can find in the plugin section of this forum. A third way is using lerp to interpolate between the two positions, but this takes some coding to figure out, so because you seem to be new to construct I would recommend option one or two..

    Because you are referring to lucasarts you probably want to scale the sprite too.

    Here's a simple example of how to do that:

    index.html

    And here's the capx

    distance-scale.capx

    I've used scale, but you could also use width and height, size..

  • The event you made checks if there is a sprite that has a boolean stopped is true and stops all sprites if so.

    This is because in this event you haven't picked a sprite so all actions will be performed on all sprites.

    You could set the sprite to stop as a subevent of the collision event, for that certainly picks the right sprite, or you could change the event that stops the motion into picking.

    Using a for each sprite would work..

    Pick by evaluate would probably be better.

  • Like it says. It can be hard.

    This is because there are so many characters in those languages the spritesheet will become immensely big.

    If you are aware of the limitations, using spritefont shouldn't be a problem. I'ts very unlikely you'll be using all japanese characters in your game, so if you limit the spritefont to the characters you will use, it's size won't be enormous.

    The problem will obviously be, knowing which characters you use in your game.

    The bottom line is, yes, you can use the sprite-font, but try to only convert the characters you actually use in your game.

  • on touched pick top instance.

  • easiest way is

    on button pushed - set timescale to 1-timescale

    this way the button toggles between (1-1) = 0 and (1-0) = 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't promise you to be very quick with answering, I have a busy few days, but ofcourse I will have a look if you give me the link..

  • system pick by comparison.

  • If I set red to 255, instead of a gray box I get a white box.

    I guess you should map the values to the 0-255 range

    I found this example on the forum:

    (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min

    which would translate for blue and green to:

    (loopindex - 0) * (255 - 0) / (1280 - 0) + 0

    or int(loopindex*255/1280)

    Ok, this gives some interesting colour transitions when changing the value of red, but nothing close to the red and black square you show..

    Guess I'm making a mistake..