Pancholo's Recent Forum Activity

  • Good evening, fellow Constructors.

    I hesitate and debate a lot whenever I think about making a post, especially if it's a whole new thread, so please, bear with me.

    What I want to achieve is related to looping and spawning certain tiles/blocks in a specific order. I am making a calendar with rexrainbow's system date and time plugin. After some arrays and variables later, I got most of its core set up. Now, all I need to do is have a certain tile spawn many times, filling the calendar (6 rows of 7 tiles each, one per day of the week) depending on the total days of the current month. I have managed to get a loop to spawn just ONE extra tile right beside the original, not the specified 30. Why would that happen?!

    My CAPX. I'm using the beta r141. WARNING: May look messy, I think. I feel like I'm exposing my underwear whenever I show people my code.

    Also, how would I be able to make the days/tiles fill up exactly like calendars do? As in, months starting/ending on the correct days. I can't, for the life of me, figure this one out. I've searched for numerous implementations of Javascript calendars to see how they deal with its code so I could somehow emulate that in pure C2.

    I'm not the type that asks a lot so I try to exhaust my personal research skills first. This is making me go nuts! Thank you, everyone, in advance!

  • Would a camera following the sprite with lerp do the trick? I just thought of that and I'll give it a try when I arrive home, but I'm feeling it can at least solve something.

    EDIT:

    Now I thought about making JUST the tiles be pixel rounding dependent, while the animated sprites (like NPCs/player) do not depend on it. Is that plausible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LittleStain

    Hah! You are right. I just found it awkward and my brain couldn't process it like that it seems. I need to be more creative if I'm aiming to become a full-fledged programmer!

  • Thank you, Ashley! I am still a novice with JS (and programming in general), but it surely makes sense now. That plugin will be my first real JS project goal. I am definitely inspired now.

  • c4sp3r89 He meant that he doesn't want his invisible objects to be clickable in any way. He can get them invisible just fine, but they can still be clicked in that state.

    Maybe try putting the buttons/UI elements you want to be fully unavailable in specific layers, then turn on/off said layers? See if that works.

  • Is there any way I could call a layout through Javascript?

    First off, I am aware of the Call Javascript plugin. I currently use Pode's HTML pack (the div one) and import CSS plugins to have an HTML calendar render on my layout within Construct. What I wanted to achieve was, on clicking a day of the calendar, the action would take you to a layout. How do I achieve this?

    I know I will probably have to use the Call JS plugin (or do the Javascript right into the HTML), and all I want to do is attach each calendar cell to a function that calls a layout on click. Again, I can't do this with events since the calendar is in HTML, or can I?

    Thank you in advance.

  • English translation of amariscal's question:

    How can I make tactile buttons?

    I figured out a way to make buttons that move the player, but as the player moves, the buttons stay back without following the screen. How can I make the buttons remain locked in place or follow the viewport?

    Now my reply to him in Spanish (don't worry, I'll translate):

    Buenas, Ese problema es com?n entre la gente nueva de Construct 2. Usualmente lo que se hace es que creas un 'layer' nuevo espec?ficamente para los controles de la interfaz (puedes cambiarle el nombre a 'UI' o 'Controles', como quieras). Al tener dicho layer seleccionado, en su columna de propiedades le cambias el parallax a 0. Esto hace que el layer no se mueva y tus botones siempre estar?n disponibles.

    Suerte!

    English translation:

    Good day, amariscal. This is a common problem among Construct 2 newbies. What you usually do is create a new layer specifically for the interface controllers (you can even rename it to 'UI' or 'Controllers', if you want). By having said layer selected, check its properties' column and change its parallax to 0. This makes the layer remain static and the buttons will always be available.

    Good luck!

  • Off the top of my head, these are some that I have found useful:

    tIDE

    Tile Studio

    Tiled

    Tiled has been my favorite one so far, specially because there's a TMX importer plugin for C2 around here.

    Have fun!

  • You do not have permission to view this post

  • Thanks for these amazing plugins, Pode!

    This has opened the door to a lot of possibilities. The only thing I seem to find awkward is that the only way I can add full HTML code without C2 getting picky with values is if I paste all of it in a textbox, then I call insertHTML with an event. I was able to implement a calendar I made with HTML/CSS (using your ImportCSS and div plugins) and it all looks great. The only problem (or not really a problem) lies in the way to "inject" that first HTML code.

    Now, on to the questions for whoever has the knowledge: Is that the only way to add full, real HTML, or am I missing something? Also, would adding javascript within the HTML be functional in the plugin, or would the js code need to be elsewhere? I specifically ask this since I'd like to have each cell in my HTML calendar to open/go-to a new layout, though I'm guessing that would require a specific plugin, correct?

    Thank you, again, for your effort.

Pancholo's avatar

Pancholo

Member since 29 Mar, 2013

None one is following Pancholo yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies