randomly's Recent Forum Activity

  • Well, what I need to do is to display a sprite on top of the map when clicking a marker on the map.

    I guess I'll just have to move the map to the side when clicking the marker and displaying the Sprite there...

  • rexrainbow

    Just noticed that the map obscures any sprites that are in the same area, even if their Z-order is above the map.

    (See Example .capx)

    Is there any way of displaying any sprites above the map?

  • If I understand you correctly, what you need is a way to spawn objects randomly spread on a circle?

    If so, this is what I would do:

    • Set a number variable to random(360) to get a random angle
    • Now, to the more complicated part: Getting the coordinates of the point on the circle using the angle we created before
    • Get the X coordinate with this calculation: [X coordinate of circle center] + cos(angle) * [circleRadius]
    • Get the Y coordinate with this calculation: [Y coordinate of circle center] - sin(angle) * [circleRadius]

    This should get you going.

    Here is an example .capx, in case you are stuck.

  • Looks pretty good already!

    The problem that you're encountering are collision polygons.

    Since your game is highly dependent on collisions, it's important that the collision polygon of your player fits exactly between two obstacle blocks and that the shape is the same.

    To achieve this, you'll have to look at the size of your player and your obstacles.

    Example:

    If an obstacle is 50 x 50 pixels, your player collision polygon must not be bigger than 48 x 48 pixels.

    (If it was 50 x 50 or 49 x 49, it would not fit between two obstacles)

    And you will also have to make sure that both the obstacle and player collision polygon's dimensions are 1:1 (=quadratic).

    Here is a .capx demonstrating what I mentioned. Note how the player is 48x48 and the tilemap obstacles 50x50.

    Hope this helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just in case anybody wondered: yes, the code worked, I'm 20$ richer now.

    And I have no idea why did this giveaway, there aren't even ads in his game...

    I guess he's just a very generous and kind person!

    Thank you again !

  • If it is only object properties and not e.g. behavior-related values, you can simply export the current object's state via the object expression [objectname].AsJSON.

    You can save this with LocalStorage, Browser Invoke Download or NW.js filesystem.

  • While creating the above .capx, I ran into some issues that might be simplified by changing/updating the Listview plugin.

    Some suggestions:

    • Add a For each row condition plus a CurRow expression, returning the current row in the loop. If you got the time/motivation, you might wanna add a For each cell condition as well plus a CurCellX and CurCellY expression, returning the current row and cell index of the loop
    • Actually, this is a bug. When clicking on a row, the selectedRowIndex expression changes and the SelectedRowColor is applied, as intended. But, when you click a button outside the Listview, the background color resets back to the default color (as intended) while the selectedRowIndex expression stays the same as before. I would suggest to change the selectedRowIndex to -1 when the Listview is unfocused, so you are able to see when the user clicks outside the Listview. Alternatively, you could add a "On focus lost" event
    • I also noticed that when changing the selected row via the Select row at index action, the event On selection changed doesn't trigger. I think this should be the case
    • Last, but most importantly: A Change content at action would be freaking awesome. I would say that action should get the index of the row where you want to change the content and a content as parameters. With the current plugin, you have to remove a row and add a new one if you want to change the content of a row, which is a very tedious process. Adding the above-mentioned action would simplify this process a lot.

    That's all. (Hope it's not too much)

    Thanks for your awesome plugins!

  • The lines that were added disappear when I change layout

    Setting the Listview to Global should fix that, but not saving it across closing and opening the application, if that's what you mean.

    Here is a capx to demonstrate how to export the Listview content to LocalStorage (where LocalStorage can be easily replaced by NW.js filesystem), fully commented.

  • Noncentz705

    just in case you didn't notice the previous reply, here again: The download link is offline, you need to switch to a different filehoster, since Dropbox deprecated the "public" folder.

  • I think I found a bug.

    When using the action Set background color, the background color doesn't change.

    Download sample .capx here.

    Running current stable r244, Windows 7 64bit.

  • ocupado

    Try to make the Listview global.

  • I had updated rex_listCtrl and rex_gridCtrl, now it will not update immediately when when setting total lines/cells count. Please download them again.

    You are a genius!

    That update solved the issue for me, I didn't even have to change anything in my code!

    Thank you so much!

randomly's avatar

randomly

Member since 26 Sep, 2016

Twitter
randomly has 1 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies