Magistross's Recent Forum Activity

  • Time to dust off an old cp3 of mine. This should help you do what you want :

    drive.google.com/file/d/1t_6EDnghFIEhLgSiSj1WmAmU5YAwiAhJ/view

  • You can compare the AdvancedRandom.Weighted expression directly in a condition using "System > Compare two values".

  • Using the permutation table is quite easy. You initialize it with a length and a starting value, and it'll automatically randomize itself.

    Problem is, you need to create a visual pseudo-shuffling animation. To that end you can still use a normal random call, but when it's time to pick a final number, you do so using the permutation table at the correct index.

    Here's your modified example implementing what I explained :

    drive.google.com/file/d/1HkqVTyFrRjg0AvcsHcTZXT25oTs_D_89/view

  • Good job putting my examples to good use. I must have been in some sort of coding trance when I made those because now they all feel so alien to me !

    Keep up the good work !

  • You do not have permission to view this post

  • You can also bundle a sprite and an array together in a container, so each sprite instance will get its own personnal array.

    However, it'd much simpler and intuitive to be able to reference said array the way you pointed it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use another tilemap with a single tile and set it as solid and invisible. No tile = passable, tile = obstacle.

    You can either pre-tile the obstacle tilemap or tile it at runtime based on the other tilemap.

  • I delved a bit in the source code of the tilemap, and I don't think it's reasonable to have a plugin to do that. The collision engine is deeply rooted in the C3 core and most of its code is external to plugins.

    I think it would be better to have Scirra officially support this. Maybe by adding a new tile state to its mask (i.e. collision disabled flag) ? A tile state already flips the collision polygon accordingly, maybe a new state to entirely remove the polygon for said tile is easily feasable ?

  • Another workaround would be to use 2 tilemaps, one for visual representation, another invisible one for obstacles (with a single obstacle tile in the tileset).

    You could then rebuild the collision map on layout start or tilemap creation by iterating through each tile and testing for collision (slow) or defining obstacle according to tile IDs (fast). And then, remove obstacle tiles by iterating through bridges and what not.

    Here's a crude exemple : drive.google.com/file/d/18kc2dI-WpgbQXATVs-NWX4H_GTBHdnyV/view

  • Saving the project as a "project folder" is the only way to allow cooperation through something like git.

  • A good way to organize events so only one branch trigger would be like this :

  • To put something in the global scope, you can use "globalThis.somethingGlobal = someObject", so in your case, in the "OnBeforeProjectStart" event, add this :

    	globalThis.f_tcalUpdate = f_tcalUpdate;
    

    Now because JS module are in strict mode, another correction need to be done in your tcal.js file. A variable can't be used before declaration so line 148 is invalid. Just add "const" in front the line and it should work.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies