procrastinator's Forum Posts

  • Ok seems you edited your post while I was posting ;)

    Language is a global, so will remain the same layout to layout.

    As I said, just have a seperate event sheet with the array code. Put it in a group in that event sheet. That way you can activate the group and execute the code when you like.

  • You could have a seperate event sheet with the code dealing with the translations and include that for every layout. You'll still have to copy / create your objects / families per layout as you normally would.

  • Sorry, forgot about this as it was pushed off the first 2 pages. Only found it again by chance.

    dl.dropbox.com/u/666574/multilingual%20array.capx

    Hardcoding the instance variable "arrayIndex" allows different objects to be repeated and the correct translation text is assigned automatically in the For Each Object loop.

    As for TiledBackground.. there's an action for that - TiledBackground -> Load Image From URL to change the image during runtime.

  • Look into the WebStorage Object. Haven't played with it at all but after a quick glance, it stores session values so should be ideal for you.

  • Double click the landscape sprite to go to the image editor.

    Select the polygon collision tool (under hotspot tool).

    You should see a bounding box with 4 vertices.

    Right click the image and a popup menu will appear.

    Select guess polygon shape (it won't match exactly but it's a start).

    Right click the vertices and select "add point" from the popup menu.

    Move the points to fit the terrain.

    From the looks of things, the collision polygon isn't editable for TiledBackground.

    Here's a little capx for you.

    dl.dropbox.com/u/666574/uneven%20landscape%20collisions.capx

  • jayderyu, arrays are pretty powerful as you know. Here's a little update that I toyed with to amuse my drunken self..

    dl.dropbox.com/u/666574/array%20filling%20in%20gaps.capx

    Very simple stuff but hopefully it helps someone understand the power of arrays a little better.

  • I think this is what you're after. Hope you understand my drunken commenting ;)

    dl.dropbox.com/u/666574/array%20filling%20in%20gaps.capx

  • Array is best then.

    Here's a capx for you...

    dl.dropbox.com/u/666574/multilingual%20array.capx

    Hope that helps some.

  • That would be the worst way possible. What if you have 100 pieces of text that need translating? ;)

    Arrays and the Dictionary object would be your best bet. XML would help you but not sure how much you know and it can look quite complex at first. I haven't played too much with the Dictionary object but it sounds like the sort of thing you need. I may be wrong though. On that note, I think I'll toy with it some tonight.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why are you destroying the blocks under "secondary generation"? To give more white space? I just can't see why those events are in there tbh. You're testing for collisions that will never happen because you have the "immovable" property set for the blocks so they'll never fall. Also, you've created them in a grid fashion, so they will never collide.

    Take out the events under Secondary Generation, or disable them. It works for me.

    As for the placement of the player, set a random XY after the blocks are created, then check if it's overlapping a block - if so, do another random XY and so on, until it's not overlapping. Or an easier method would be to place the player at specific coords, then in your block creation events, only create a block if it doesn't overlap the player.

    Hard to know if I've given the right answer. It looks like you're trying to create random platforms for the player to jump around on, in which case, my answer would be correct ;p

    As for your array knowledge, it seems pretty solid to me.

  • Hard to say without a capx.

  • Take that While condition out? I've NEVER had a need for While in Construct, and it certainly doesn't need to be used there since on collision is only triggered when a collision happens so it's basically redundant. Besides, it would need to come before the condition being tested, not after.

    As I see it, your condition is reading -

    On collision

    AND

    While

    While what? The While condition is causing it to loop infinitely causing the freezing of the game because it's stuck there.

    While is useful for sorting like (excuse the simplicity but hopefully you get the idea)..

    sorted = FALSE

    While NOT sorted

    ..Sort through hiscores

    ..If hiscores are in proper order then sorted = TRUE

    While End

  • Sounds nice thanks. Will give it a go when I get further into C2.

  • Thinking more about it now after reading the discussion after my reply, I can say yes, it'd be better to store each weapon with its own value.

    currentWeapon = "gun"

    and "gun" would be the name of the sprite so it would be easier to match and pick. At least that's how I did it in a shooter I started in CC. The problem with using values to represent the weapontype is it's harder to read through events and debug.

    Unless I'm still misunderstanding because I can't check out the capx.

  • My minds eye isn't all that great and never really thought about the connection tbh. Could explain why I do find it hard to resist the temptation of opening up Photoshop. Sometimes I do give in way too early in the prototype though.

    Glad you brought that up. Now that I'm aware of it, maybe I can control my urges..