R0J0hound's Recent Forum Activity

  • Since the trees aren't moving you could setup some kind of spatial partitioning so you only check for collisions around the player. Basically the idea is to divide the layout into say 100x100 squares and keep a list of all the uids of the objects touching the squares. You could use a 2d array with a 1d array for each cell to do this.

    After that's setup you check for collisions only with trees that in the cells the player is touching.

    The idea is elementary, implementing it with events is doable, although tedious for most.

  • Even without passing the SOL functions are still very useful. That said passing a number of objects can be done by setting a instance variable on the objects before calling the function and picking them after.

  • lukezero

    The fact it's isometric doesn't make it any different to regular path following.

    Here's a way to do it:

    https://dl.dropboxusercontent.com/u/542 ... ollow.capx

    It just moves toward the next waypoint. At the start and when the targeted waypoint is changed the distance is calculated in a variable. As the sprite move the distance is reduced by the same amount, and when the distance variable becomes negative we know the waypoint was passed so we target the next waypoint.

  • The way above is the easiest.

    Another idea is actually doing the 3d transformations:

    or even using a 3d plugin:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's one way to do it, although it isn't exactly like c2's editor.

  • narFsnw

    I only know enough to get by and even then I usually reference this:

    https://developer.mozilla.org/en-US/doc ... xpressions

  • It wouldn't trigger if the same random number is used twice in a row. A possible solution that would require minimal modification to your events would be to set the number to 0 and the set it to a random number from there.

    Global variable = NumbersVar
    
    On start of layout ------ System set NumbersVar to 0
    
    NumbersVar = 0
    Trigger once -------- System set NumbersVar to floor(random(1,52))
    
    NumbersVar = 1
    Trigger once -------- create object A
    
    NumbersVar = 2
    Trigger once -------- create object B
    
    Etc...
    
    Objects family on destroyed ----- System set NumbersVar to 0
    [/code:2hlxs7ca]
  • Good job implementing it with events. The best way to speed it up would be to write it in js. However there is an existing plugin to do simplex noise, as well as perlin.

  • The layout and the properties aren't useful. A capx or a picture of events is.

    I thought there was an example floating around the forum but I couldn't find one, so here's my take.

    https://dl.dropboxusercontent.com/u/542 ... _push.capx

    I used the 8direction behavior to move the player. I also added CustomMovement and solid to both the player and the boxes. CustomMovement is used for it's "push out of solid" actions and "solid" is used to specify the solids which I toggle on and off.

    The general idea is to

    1. if player overlaps a box then push the box

    2. if the pushed box is then overlapping any other boxes then we need to push back by

    a. push the box backwards out of the other boxes

    b. push the player backwards out of the boxes.

    The only major equation used is to round an angle to the nearest 90, so we get a correct angle to push. Solid is enabled and disabled throughout. The idea is to only enable a solid if we want to push out of it, otherwise it's disabled.

  • narFsnw

    Ah, I thought there was only one. You need to add "g" to the third parameter I think? In the capx it's just "".

  • Ashley

    You can't control what a user does outside of a program. Locking the files may help, but yeah, it's more of a user misunderstanding about the use of the temp folder.

    sorbias

    Ashley answered that above you.

  • narFsnw

    The fix makes the files so they won't get bigger.

    You can clean the user's saves yourself using a regex expression. Here's a test of such an expression.

    https://dl.dropboxusercontent.com/u/542 ... eaner.capx

    Basically doing this should clean the save. After that load again with the "load state from json" action.

    RegexReplace(SaveStateJSON, """collmemory"":\{.*?\}", "", """collmemory"":{}")[/code:285hm3p4]
    Basically it will remove everything in the collmemory section.