R0J0hound's Forum Posts

  • You could do it manually if you use the spritefont with fixed width characters.

    Basically you figure out how many characters wide you want. Then per line only grab only as many words with a space in between that fit within that width. After that extra spaces evenly added till you match the width.

    For the text object you'd have to see if html5 can do full justification and then tweak the plugin perhaps?

  • Sprite.UID?

  • hmott

    The fact it's flipped is due to some graphics card drivers. It can be detected and corrected, but thanks to chrome and firefox updates I can no longer use webgl on my machine, so I haven't touched that portion. I'm hesitant to do a fix that I can't test.

    The download is the latest. All it does is leverage whatever rendering C2 already does.

  • lukezero

    Here's an idea.

  • Yeah, I guess it would be. Smaller cell size, but basically the same. I'd have to look up the blog post about it.

  • 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:

  • 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]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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 "".