dop2000's Forum Posts

  • Actually, you don't need a family. Arrays can also have multiple instance. So you can create 5 instances of Array object and store different data in them. Pick any instance of Array with an instance variable.

  • Set Global=yes for HUD layer.

  • Fade behavior must be better. With lots of frames in animation your images are using more memory.

  • Now with my example on how to transfer screen snapshots through a sprite into Drawing Canvas, you can try again :)

    .

    Actually, you can probably make an image of the entire layout much easier. Simply set DrawingCanvas size to layout size and paste all objects on it (Created_Objects family or whatever). Then save and download. You don't need to make screen snapshots.

    You probably would want to paste objects one by one ordered by their zIndex.

  • If you need to load screen snapshot to DrawingCanvas, and then save DrawingCanvas image to disk, I think you need something like this:

    Note, that you need another empty sprite (ExportSprite) to load CanvasSnapshot, which you then paste onto the DrawingCanvas. ExportSprite and CanvasSnapshot should be the same size (big enough to fit the screenshot) and placed at the same position.

    .

    Also note, that DrawingCanvas actions "Save snapshot", "Load snapshot" etc. have nothing to do with the System "Take snapshot" action. They just happen to use the same word "snapshot".

    .

    If you need to save the entire layout, which is larger than the screen size, you will need to repeat steps in event #2 multiple times. Each time scrolling to a new position, taking new snapshot, loading into ExportSprite and pasting onto the DrawingCanvas. Refer to that demo from R0J0hound I posted earlier.

  • One layout = one level. This is a common approach.

    You can set layers as global to re-use them on many levels.

  • Try this:

  • I never used Tiled software myself. Does it have an option to save or export the map in one of these formats - TMX, XML, JSON?

    In Construct 3 first you need to import tileset image into the TileMap object, adjust tile size. If you were able to get TMX file from Tiled, you can try to load it in the Tilemap toolbar. If successful, this should load your entire map.

    .

    If you don't have TMX file, it still may be possible to import the map. Please share whatever files you got from Tiled and I'll see what can be done.

  • First, I suggest making just one loop and check all buttons inside of it.

    .

    You need to link players with their gamepads. You can add an instance variable GamepadNo to the player sprite. When a button is pressed on gamepad #1, pick a player with GamepadNo=1 and control it.

    .

    Or you can do this with an array, for example X-index of the array is the player number, and the value is gamepad number. So for 4 players your array may look like this:

    x=0: 3
    x=1: 0
    x=2: 2
    x=3: 1
    

    You fill this array at the start of the game, when you ask each player to press a button on their gamepads. Then in the game when a button is pressed on gamepad with index 1, you know that it belongs to player #3.

  • Gamepad index is zero-based, so if you only have one player, the loop should run from 0 to 0. For two players from 0 to 1, and so on.

    Running this loop on every tick should not have any noticeable impact on performance.

  • You can loop through all gamepads in a loop:

    For "n" from 0 to (NumberOfPlayers-1)
    	Gamepad loopindex Button A is down...
    
    
  • I think it's Array.At(Array.IndexOf(105),3)

    But I'm not sure if IndexOf works correctly with 2D arrays.

    I can recommend CSV addon, it's very handy for accessing data from tables. For example in your case you could use CSV.At("DIALOGUE", "105")

    construct.net/en/forum/extending-construct-2/addons-29/plugin-csv-csv2array-csv2dicti-41868

  • Now I don't understand you.. Do you mean you copied the entire big map as an image and imported this image into the TileMap object?

    If this is the case, it's a pretty bad solution, for many reasons..

  • Kiwi Story template in C3 is pretty good. There is no shooting, but you can learn a lot about creating a platformer game from it.

    Also, you should be able to open Construct 2 tutorials and demos, unless they are using some addons which were not ported for C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It does work, but the origin image point in Red sprite is not in the center.

    I also suggest adding "On drop" event with the same action.