LittleStain's Recent Forum Activity

  • I would put the 4 objects in a family

    If it's impossible to put the 4 objects in a family and use one event based on that

    you could add conditions to the else event or use an 'or' block

    -cursor is over sprite1

    or

    -cursor is over sprite2

    or

    -cursor is over sprite3

    or

    -cursor is over sprite4

    set cursor to hand

    -else

    set cursor to normal

    -cursor is over sprite1

    set cursor to hand

    -else

    -cursor is over sprite2

    set cursor to hand

    -else

    -cursor is over sprite3

    set cursor to hand

    -else

    -cursor is over sprite

    set cursor to hand

    -else

    set cursor to normal

  • Edit..

    Ok..

    Setting the position every tick will ofcourse overwrite the sine behaviour..

    I guess adding an

    -every tick

    sprite4 move at angle(sprite4.x,sprite4.y,sprite2.x-100,sprite2.y-200)

    might get better results

    maybe adding an inverted system is between values condition to stop it when it's close enough

  • Do you want something like this?

    Added a spawning event to your example to show the smooth line..

    Apdapted example

  • Which part of making this game you have trouble with?

    What would you like help with?

  • Or you could add an else event below

  • Add a global variable rotation

    on space pressed

    system set rotation = 1-rotation

    system compare two values : rotation = 1

    sprite rotate clockwise

    system compare two values : rotation = 0

    sprite rotate counter clockwise

    You could ofcourse also do this by toggling a boolean instance variable..

    or using an instance variable as above..

  • It seems it does work, but when your characters are further away from eachother than the viewport width and the camera is in the center, you obviously won't see them..

    You could either limit the movement of the characters or add a zoom function for when they are further apart..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • on space pressed

    -- angle is 320

    set angle to 230

    -- else

    set angle to 320

  • Yeah, you could always use the OldX, OldY trick..

    Should be something like this:

    create three instance variables OldX, OldY and A

    -sprite is overlapping

    -- trigger once

    set A to : angle(sprite.x,sprite.y,sprite.oldX,sprite.oldY)

    -- system every tick

    sprite move 5px at angle A

    -else

    sprite set oldx = sprite.x

    sprite set oldy = sprite.y

    • (event)

    -- (sub-event)

  • You should set the text in the event sheet..

    When doing so you can use set text = "line 1"&newline&"line2"&newline&newline&"line 3"

    to get:

    line 1

    line 2

    line 3

  • Although this is not a direct answer to your question, it does have an angle follow and angle set compared to the base object..

    You might be able to turn this into what you are looking for..

    https://dl.dropboxusercontent.com/u/485 ... ollow.capx

  • Your issue is that when event 6 is true it's actions make event 7 true in that same tick..

    Events are read from top to bottom.

    You could convert the gesundheidspunkte to a subevent and use an else event for the second one, but in this case switching event 7 with event 6 would also work..

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies