calminthenight's Forum Posts

  • You can do it without the timer behaviour by using:

    is player overlapping wall

    Every X seconds - subtract X amount from player.health

  • WackyToaster is right. A tween should be initiated from a trigger otherwise it will try and start the tween every tick and never finish it.

    If you are using a boolean variable check then add the trigger once condition to the event.

  • That's right. It's useful when you need to pass a variable every tick, and have it reset when nothing is passed to it.

  • A global variable can be accessed by any event. Local variables can only be accessed by the events in the same sub event/group. Moving a global variable to a local will delete any conditions/actions that are associated with that variable, except those that are in the sub event/group you moved it to.

    Also check that you have made it static as local variables default to non-static.

  • Rather than use the scroll to behaviour use the scroll to position action on every tick and set the position to:

    X = lerp(scrollx,player.x,0.5)

    Y = lerp(scrolly,player.y,0.5)

    this should eliminate any shaking issues you have and give you a smooth camera movement.

    You can adjust the speed of the lerp, which will translate to the lag time of the camera move, by adjusting the 0.5 to any number between 0 & 1.

  • If you want you can create a separate event sheet and 'include' it in all your others. You could call this event sheet "spawn" or something similar and in it have the event:

    At start of layout

    sub: Char Select = 1 - create object "Character 1" at XY

    sub: Char Select = 2 - create object "Character 2" at XY

    ..

    ..

    Family "Characters" On destroyed - restart layout

    ..

    ..

    This would handle your respawning, provided that you want to restart the level when you die.

    If you didn't want to restart the level from the start, say you had a checkpoint, you just redefine where you want to start:

    Family "Characters" On destroyed

    sub: Char Select = 1 - create object "Character 1" at checkpoint.XY

    sub: Char Select = 2 - create object "Character 2" at checkpoint.XY

    Best of luck

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have a look at this: 1drv.ms/u/s!AkmrWgxeuxlKhIdfX0KZEh6ISeyynw

    You can add as many characters as you like, I just used two for the demo.

  • I'm not sure you got the right idea from what I said before.

    Let me make you a little demo to explain it. I'll post it here soon

  • I'd add all of the character objects to a family and then add all your behaviours to the family instead. All your code for the player would have to be moved to the family.

    Then use a global variable for the pick menu and set it to a number, dependant on which character is picked.

    At the start of your levels (layouts) create the character based on which variable is picked.

    Alternatively you could move all of your different character animations to the one object and use conditions to pick which is active.

  • You don't have the event sheet assigned to the Layout :)

  • object.lineofsight.hitX & object.lineofsight.hitY will give you the coordinates of the intersected raycast.

    You can also use object.lineofsight.hitdistance if you need a quick measure of the distance.

  • These are all most likely user errors (saying from experience of similar situations myself). However, no one can help you unless you post your project.

    Upload it to a cloud storage like onedrive etc. and then share it via a link here.

  • Love that. Hadn't seen it before :)

  • If you read the basics of construct and look at the text and text input entries in the manual you would be able to figure this out, but here you go: 1drv.ms/u/s!AkmrWgxeuxlKhIdcNtTtM-9MI7QkyA

    construct.net/en/make-games/manuals/construct-3/plugin-reference/text

    construct.net/en/make-games/manuals/construct-3/plugin-reference/text-input

    EDIT: i updated the picking based on text object clicked. Redownload the project file

  • Have a look at this example: 1drv.ms/u/s!AkmrWgxeuxlKhIdbX3uKAyMjM_ABiQ

    You need to match the velocity of the player and the follower every tick. In the sample I'm using moveto for both so it is easy, but if you are using 8-direction or platformer for the player movement you can still copy the velocity.

    I'm spawning a follower waypoint every tick to show that it can be perfectly smoothed but you can certainly thin it out with no effect.