Magistross's Recent Forum Activity

  • If using a dictionary is your only solution, you might want your dictionary keys to convey useful additional information.

    You could have keys like "key_0" or "key_something" where "key" is your actual key name and the "_" suffix is some additional information that helps you identify what tilemap the data should correspond to. You can then parse the key name to retrieve the info.

    Note that this is much slower than all the other solutions proposed.

  • I never really dabbled with the multiplayer object but I think a single "host" layout that handles all peer communications should be the privileged solution for a "multi-layout" multiplayer game.

    However, I think it would also force you to rely on custom messages for syncing your game state...

  • The spritefont object can't have some of its characters recolored temporarily. There is really no easy way to that without resorting to some clever workaround.

    You can map additionnal characters that are almost exact "copies" of existing ones and are mapped to differently colored characters. To create your additionnal characters set, you can use something like this : lingojam.com/WeirdTextGenerator

    In your SpriteFont sprite, you then add additionnal characters to match your new characters set and apply whatever color you need.

    For example :

    abc... are mapped to white characters

    𝔞𝔟𝔠... are mapped to red characters

    𝒶𝒷𝒸... mare mapped to green characters

    etc.

  • Oh... I see. Since in my example conditions are set top-to-bottom, left-to-right, some conditions of "opposing" tiles get wrongly overridden.

    You'd need to add another group of loops to add specific condition for L shapes, and even a third set of loops if you plan on having U shapes.

    Doing everything in a single pass might be possible, but I'm getting a headache just thinking about it! Haha !

  • A 4 corners wall ? You mean a square ? I believe it shouldn't be passable to begin with ! :P

    How do you want the system to react ?

  • It obviously makes sense to limit expression functions to functions with a return value, but is there any good reason to restrict action functions to functions without a return value ?

  • It's basically a queue based flood-fill algorithm. It was perfectly suited for this kind of situation! ;)

  • Hi Microbex, did you mean something like this :

    dropbox.com/s/e0lj64hx93cx4wc/array%20test%20grid.c3p

    What I basically did is add an 1D array (akin to a list) that get populated with tiles that need to propagate power.

  • It seems function with return values can only be called by expression, which is unfortunate. I guess you could circumvent this limitation by using a useless expression like "Set dummyValue to Functions.myFunction", but it is rather annoying.

  • Did you actually add parameters to the function ? This is an additionnal step that you did not have to do before. Right-click on the Function event, and "Add parameter".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Inside your function event, you'll have access to your parameters as expressions directly under System > Global & Local variables.

  • New function's parameters are treated as local variables.

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