adventurist's Recent Forum Activity

  • Okay, so I made another kind of loop like this:

    It works for the first fish object on the list, with UID 8. But it wont loop and continue on to the next line, and set the next fish to invisible.

    Do I have to add to the loopindex for it to progress? loopindex+1 or something?

  • Yeah I'm pretty sure I'm supposed to use a for each loop, but I have no clue how to make it work with regexMatchAt.

    This is the only thing I've been able to come up with, and it doesn't work of course:

    I'm sure I'm just missing something that's not clear to me at the moment.

    Thankful for any more detailed help.

  • Hi!

    I'm making a platformer game where, when the player collides with a object called "fish", the fish object will set its own instance variable called "collected" to 1.

    Then, at some point in the game, each fish object that has the variable collected set to 1, will be "saved" into a file with the help of a loop.

    The file will look like this:

    ...

    fishCollectedUID:8

    fishCollectedUID:9

    fishCollectedUID:10

    fishCollectedUID:11

    ...

    If you ever exit the level to the Menu, and then chose to continue, I need to somehow make a loop that can find each new line with the word "fishCollectedUID:" and use the number written after to set each fish on layout to invisible with that UID.

    I know to use regular expressions, and I have no problem writing a expression to find the word "fishCollectedUID:" and the number. But I'm having trouble writing a loop that would go to the next line, after the one above has already been checked.

    Also, the number of fishes collected are unknown, since the player picks them up as he/she pleases, before going back to menu.

    For your knowledge, I also store the files content in a global variable, so I can check that with a regular expression like this: regexMatchAt(gameSaveInfo,...)

    Is it possible to do in Construct 2? Would someone be able to show me an example of how I could do this?

    Hopefully I'm clear enough with what I mean, and if I'm not, ask I'll try to be more specific.

  • Try Construct 3

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

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

    Well, I wanted to have a go with compiling my game with ejecta, but I wanted to try to implement the in app purchase function, and noticed on ejectas website that you have to be able to restore purchases in case the user decides to reinstall the app after uninstalling it. There's no such option in the plugin used in construct 2 (I downloaded it from github), so I'm wondering how you would go about doing that.

    The code to use is apparently: .restoreTransactions( callback(error, transactions){} )

    Do you execute it with the browser object and choose: exectute javascript?

    Thankful for any help! :

  • Hi!

    I'm not sure if Construct Classing ,being open source and all, makes it okay to sell it as a program. I was just searching for construct unrelated things on google images, when I saw the image of the demo ghost shooter, and when I clicked it I was surprised to see someone on Ebay are selling the construct classic program.

    I thought I'd bring it up in case this is not allowed.

    Not sure if I can posts ebay links here.

  • Never mind, I figured it out!

  • Hi!

    Are there anyway to compare collided object intances X values?

    Like:

    "if instance A Collides with intsance B and both A and B has

    same X value, then..."

    The objects positions are not known at the start because they are

    positioned randomly.

  • Thanks!

    I changed it so the 'for each' events are triggered on 'start of layout', and I also changed so that once green is deleted, another events checks if it is, and then spawns another object. Works fine that way.

    Thanks for your help! I will not abuse the 'trigger once' again. :)

  • Hi!

    I've got a problem with spawning a new object at the last objects position.

    Now it works spawning a new object, but sometimes it spawns an object twice.

    Let me show you my code:

    <img src="http://i.imgur.com/zGIpBz9.png" border="0" />

    so basically I create a grid with randomly created objects with different colors.

    Then I check if a green box collides with another green box, and if it does, delete it and spawn a new one at its position.

    Sometimes, not all the time, it creates two at the same position, which I can tell when counting the objects and testing in debug mode.

    Does anyone know why it does this and how I can prevent it from happening?

adventurist's avatar

adventurist

Member since 20 Sep, 2013

None one is following adventurist yet!

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies