calminthenight's Forum Posts

  • 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

  • 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 :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Unfortunately no one can just tell you how to make an enemy AI. You have to plan what you want the enemies to do, think of every step; do you want them to move, if so how? do you want them to shoot, if so how? and once you know what you want you can apply your understanding of the engine to the problem. Learning the basics is the most important thing.

    The construct site and the homepage of the browser are full of tutorials and demos of all types. Browse there if you want to see examples. construct.net/en/tutorials/construct-3

  • Everything that oosyrag said. And then..

    The type of game you are trying to make is an on-rails shooter.

    If you type "on-rails shooter" into the search bar on the homepage in the editor there is a good demo project that is based on star fox that you can dissect and understand.

    EDIT: "Do a Barrel Roll!"