bartalluyn's Recent Forum Activity

  • Thinking outside the box;

    what I did in a previous (large) project I circumvented this by creating a very large layout.

    It was a building with multiple floors.

    Instead of creating a layout per floor, I created them below one another on the same layout. Going to the next floor was a matter of fading in and out a black block sprite as kind of a transition, and meanwhile moving the scroll down by x pixels.

    It was very handy because i could then make an elevator for example to "teleport" people moving around across floors by moving them up and down x pixels.

    but maybe that's not what you want...

  • Good question, I haven't given that a lot of thought really...

    My first hunch would be to create the slots dynamically as well, making a grid of slots, and filling in the id's programatically, and looping as you do now. Something like that.

    Shouldn't be too hard to do, if you just set up a number of rows and columns, decide on the height and width of the slots, an offset between the slots, left margin, top margin, and you're good to go really.

    I'm a pretty big fan of placeholders, as you might have noticed on some of my video's on my youtube channel, and granted that has been prone to errors, but the need for generic systems is rarely the case. Certainly not in C3 as you don't (yet) have options to integrate predefined blocks of logic.

  • I added an "id" instance variable to the slots and filled the 4 slots with number 0 to 3

  • maybe you can post the c3p file if that's not a problem

  • You do not have permission to view this post

  • Hard to deduct from the text actually, but I would try the following:

    Change the slot to add an instance variable to indicate it is used. for example "occupied". 0 or 1. Initialise them to 0

    within the Dictionary loop,

    pick by evaluate with expression slot.category = dictionary.currentKey (or whatever holds the category)

    In a subevent. Pick 0th instance of slot. So within the first picking, you've got the first one. So you're left with only 1 slot with the correct category.

    Do your stuff with animations

    Set Occupied to 1.

    If you're interested you can check out my tuts on my youtube channel where I do stuff like that:

    For example in Solitaire: First pick by evaluate, and then within that pick top.

    Many many tutorials have "pick by evaluate" by the way, and also dictionary loops.

    You can check them out if you want.

    youtube.com/watch

  • Hi,

    first of all I would use On Object Tapped Answer1, not on touching.

    Second, I would use only 1 event, en set the "TimeLeft" variable to this expression :

    TimeLeft >= 51 ? 60 : TimeLeft + 10

    alternatively

    min( TimeLeft+10, 60 )

    Just for your info, I can refer to my Youtube channel where I do things like in my tutorials.

    youtube.com/channel/UCZ6QjvqEs9dR2miRnfFqIpQ

    Hope that helps

  • Add pin behavior to mineral.

    Add instance variable to player. 1 for if he holds a mineral, 0 for if he doesn't. Start with default 0.

    Make a function called "Find" that does this:

    pick random mineral:

    Find path to it.

    Event: Upon path arrival AND player has no mineral.

    PIN mineral to player plus set instance variable to 1.

    Find path to house.

    Other event : Upon path arrival AND player has a mineral (means has found path to house)

    Destroy the mineral and set instance variable to 0

    Call the "Find" function again.

    On start of layout also call "Find" to make it start finding immediately.

    My youtube channel contains some video's you can check out:

    for the pickup and drop off logic :

    youtu.be/4dD_Ajmjwic

    for the path finding logic :

    youtu.be/cf4fwgjAJK0

    Hope you can fit the pieces together

    cheers

  • It's probably got something to do with the condition NextPlatform >= ViewportTop("Layout1"). I would suggest debugging it, maybe just put them on a label on your layout to see what the values are at any given time

  • did you activate unbounded scrolling?

  • You do not have permission to view this post

  • Hi, Save/Load will work, but the disadvantage is that you will save all of the rest too, not just the array/dictionary. Unless you assign the "nosave" behavior to all object types.

    Check my youtube channel, it's filled with examples; for example this one. Where I use save/load, but on top of that also save load a dictionary to local storage. So both systems combined so to speak

    youtu.be/1EEESGQu28M

    A lot of other tutorials load stuff from arrays and dictionaries, so maybe that can help in some way too. check them out

    cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
bartalluyn's avatar

bartalluyn

Member since 22 Apr, 2018

Twitter
bartalluyn has 33 followers

Trophy Case

  • 6-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • x61
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies