gardnerp's Recent Forum Activity

  • Only level 7 :(.   Fun game, it gets a little choppy when things get hectic. Also, it seems like once you lose one life it's really easy to lose another at the same time, since you can't see.

    Good silly fun!   Thanks!

  • Obviously it is a work in progress, but it's fun so far. Congrats.

  • I'm using xml files as maps. I would like to create objects based on xml tags. Currently, I seem to have to read in a line from the file and then have a condition for every different kind of object which exists and then create that object.

    Here's a crude psuedo code version of the events:

    for each node in xml:

    if node.name = "skeleton":

          create skeleton

          set xlocation

          set ylocation

    if node.name = "hippy":

          create hippy

          set xlocation

          set ylocation

    I would prefer to do this is a dynamic fashion:

    for each node in xml:

    createObjectByName "skeleton"

    set xlocation

    set ylocation

    Is there a way to do this in Construct 2?

  • Thanks!

  • Hi There,

    I have a series of buttons that allow the user to switch between layers. I store the target layer numbers in instance variables on the buttons.

    Sometimes, I also switch between layers through events.

    I would like to store the layer numbers in global variables like "GAMEOVER_LAYER = 1", instead of just using the raw layers numbers all over the code.

    However, I don't understand how to set my button instance variables to be equal to the global variables I've created. When i type the name of the global variable into the instance variable assignment box, when I hit enter, it resets the value to 0. Do I need to use some kind of prefix on the variable name? Is it even possible?

    Thanks,

    Peter

  • Create a project with two layouts

    Add a button on both layouts.

    Switch to Layout 1

    Activate "Snap To Grid"

    Change the grid size to 15

    Change the size of button on Layout 1.

    Note that this functions correctly, it changes size in increments of 15 Switch to the Layout 2

    Activate "Snap to Grid"

    Note that the grid size says 15

    Change the size of the button.

    Note that the button changes size in increments of 32.

    You have to change the increment for both layouts, even though it says it's the same.

    Desired behaviour:

    Increment setting should be global or increment display should be updated when changing layouts.

    No, I didn't post a capx. Sorry, I dont have a dropbox account and while I want to you know about the bug, I can't spend time on such a simple repro.

  • I'm creating a game where I need to find operate on a list of objects in relation to other objects in that list. For example, I have some sprites with I call Creatures. The creatures need to figure out how far they are from all the other creatures and they do an action based on that distance.

    My thought had to been to use a loop inside a loop like so:

    // Loop through each creature

    for each Creature

    // Then, for each creature, loop through them again

    for each Creature

    // If we find a creature that matches some condition

    if CreatureFromFirstLoop.condition

       // Do something

       CreatureFromFirstLoop.setInstanceVar(CreatureFromSecondLoop.data)

    The problem is that I dont know how to appropriately refer to CreatureFromFirstLoop and CreatureFromSecondLoop.

    With Construct2, this is all I know how to do:

    for each Creature

    for each Creature

    if Creature.condition

       Creature.setInstanceVar(Creature.data)

    The problem is that this wont do what I want it to do.

    Does someone know how to the change the second one into the first one? Or some other way to do it?

    Can someone help or give me an alternate strategy?

  • You want a range of 5 numbers: 5 6 7 8 9,

    so get a random number between 1 and 5 and then add 4 to that number.

    It would be something like:

    4 + int(random(5))

    I dont recall if random gives you a spread from 0 to the number, if that is the case you might have to do this:

    5 + int(random(4))

  • Hi Jumprock,

    You might be thinking about this from the wrong direction. You probably already know this, but I'll say it anyways: When you select objects with a condition, all the objects with that condition are returned. Therefore, if you have an object called Ball, operations on "Ball" select all of them, but operations which select the specific UID only select the one with that UID... But this also works with instance variables.

    If you have two objects that you want to be related in this way, set an instance variable in both to the same (unique in your game) value. (You could do this at the time they are created, perhaps) For example, if you created three sprites and set an instance variable called "attr" to "5" in two of them, but not in the third. When you go to select instances via "Compare Instance Values" and you sellect for attr=5, you will get two instances of the object with the value set, but not the third.

    Does that make sense?

  • Hi All,

    I have uploaded my first game to the Scirra Arcade. It is called Baller and it is a simple basketball physics game. See how many baskets you can get in 60 seconds. Pretty simple. Future versions will include facebook integration to save high scores and after that........ Lots of other ideas.

    scirra.com/arcade/action/108/baller

    Please let me know what you think.

    Thanks,

    Peter

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's how little I know: I didn't know there was a plugins section on the site. To that end, I don't think that I have downloaded and installed any plugins...   Perhaps it was behaviors causing the problem.

    Here's what I did:

    I removed Touch and went back to Mouse

    I also removed the Jump Through behavior (the one so you can jump up onto platforms from beneath)

    I guess it's just a little counter-intuitive, one (meaning I) would think that the items included in the base IDE would be okay to use for games on the site.

    At any rate, my game is up now. It's called Baller and it's not very good. ;)

  • Not being very experienced with Construct 2, I don't really know which plugins are 3rd party and which are not. It seems like "Touch" is on the "not allowed" list. If that is true, it's pretty annoying.

gardnerp's avatar

gardnerp

Member since 3 Dec, 2011

None one is following gardnerp yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies