dop2000's Forum Posts

  • TileMovement behavior doesn't support diagonals. But you can use MoveTo behavior instead. If you have a tilemap, locate the destination tile (tileX and tileY) and use this action:

    Character MoveTo (tilemap.TileToPositionX(tileX), tilemap.TileToPositionY(tileY))

  • Instances you create in event 2 are not available immediately in event 5. You can fix it with "Wait 0":

    Note that Wait 0 delays execution until the end of the tick, which may break some logic in other events.

    Another (and probably better) option is to move events 6-8 into a function or a custom action. Call that function/custom action from events 3 and 4, for each created array.

    Also, you mentioned that the code runs once, which indicates the array is global and already has one default instance. If you then create four more array instances, you’ll end up with five in total. Either destroy the initial instance at the start, or set the array to not be global.

  • Can you post a screenshot of your events?

    "Trigger once" without any conditions will run on the first tick. If the dictionary or the key does not exist yet, it won't work. You can try adding "Dictionary key 'foo' exists" as the first condition.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to put the FileChooser object on the layout - it can be outside of the visible area.

    In "On changed" event use "AJAX request FileChooser.FileURLAt(0)" to read the file.

  • You can simply use different animations in the character sprite - with and without the armor.

    Or spawn the armor sprite and attach it to the character with the hierarchy - "Character add child Armor".

  • Many people use AI to help with Construct programming, but it often requires a lot of back-and-forth..

    GDevelop's native AI integration is likely much more efficient and therefore has a smaller carbon footprint on average.

    Frankly, I'd be happy to have a built-in AI in C3 to assist with mundane and repetitive tasks.

  • This is a very basic and easy task, have you tried studying any examples or tutorials?

  • What exactly do you need help with - displaying the armor sprite on top of the character sprite? Or with HP and damage calculations?

  • I do however agree that Construct shouldn't save all that extra data to the project. I think that is an oversight, and at that point the data should be truncated, much like nobody expects undo to still be there after opening a project, in order to save memory.

    Ashley This sounds like a reasonable solution, thanks.

    My only concern is that some people may temporarily shrink tilemaps while working on them. For example, if a map consists of three layered tilemaps, they might shrink the top two while editing the bottom one. If the project is saved in that state, any data in the shrunken tilemaps would be permanently lost.

  • I also have a PointValues array object - but have no idea how to populate it with data - unable to figure out how to insert data into the array object.

    Use "PointValues Load" action.

    -> PointValues: Load from JSON string AJAX.LastData

  • Look at the PointValues object in your project - what is its type, what icon does it have?

    I'm almost certain that your PointValues object is JSON, which is wrong. You need to delete it and add a new Array object instead.

  • set PointsValue json from parse AJAX.LastData

    Consol log PointValues.Get(".Value1")) - returns value of 0 - which is incorrect.

    Looks like your PointsValue object is a JSON object. It needs to be an Array object.

    You use "Array Load" (not "Parse") action to load the data, and Array.At() expression (not Array.Get()) to access it.

  • See the official "Blend modes" example. You need to place both objects on the same layer and enable own textures on the layer. The blend mode should be applied to the top object. For example, you can bring the 9patch to front and set its blend mode to Source Atop.

  • Check the collision polygon, if it has some weird shape, this can cause the bullet to collide again after bouncing.

    If your bullet is animated, make sure the collision masks and origin image points are the same in all frames.

  • Seems like there's a limit of 4 controllers in Chrome. But in Firefox you may be able to use more.

    stackoverflow.com/questions/41251051/is-the-html5-gamepad-api-limited-to-only-4-controllers

    issues.chromium.org/issues/40275102