theubie's Forum Posts

  • Fear not. Here's the link I promised:

    Leader Board without Plugin Tutorial

  • You got it. I'll write up a tutorial and get a capx and demo read. I'll post a link when I'm done.

  • The problem with leaderboards is that you need some sort of backend to handle them. Most people use a plugin like clay.io so that they don't have access to their own server, php scripts and a database.

    If you have a server, and have access to use php and something like MySQL I could give you some pointers on how to accomplish this, but it's beyond the scope of Construct 2 to handle this by itself.

  • Every sprite has a .count expression. Assuming you have one sprite for your enemy, and that enemy sprite is named Enemy, then the expression to find out how many enemy sprites you currently have in your game is:

    Enemy.Count

    If you use the System event: Compare two values you can compare the Enemy.Count expression with however many sprites you want to limit in your game to see if you are under that amount.

    The screen shot I posted is exactly what you would have in Construct 2 to figure this out.

    If you have more than 1 enemy sprite you're wanting to check on you've got two options:

    Place all your enemy sprites into a family and then use that family's .Count expression.

    Or you can add all the .Counts from each sprite (Enemy1.Count + Enemy2.Count + Enemy3.Count) in the compare value event.

    The family method is better IMO as families make your life better in general.

    For more info on common expressions see this manual entry.

  • Add a condition to your every x seconds that checks the count of your enemy sprite like so:

    <img src="http://www.infinitepossibilitygames.com/demos/maxenemy/maxenemy.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you placing them during design time or creating them during runtime?

    If you're placing them during design time, you can, in fact, set their instance variables.

    If you're creating them during runtime, you should be setting their instance variable when you create them.

  • System: Bullet -> On Collision with Object

    System: Pick Object Instance 0 (pick nth instance)

    This will always pick the first instance in a collision event regardless of how many instances are returned.

  • If I were doing it, I'd create a global variable called sequence.

    I'd give each painting's button it's own instance variable called

    number, and assign them a number 1 through 4. (Mona -> 1, Supper -> 2, etc...)

    I'd wrap the following in a group:

    When a player jumps on a button, I would append the number of the button to the sequence variable. (i.e. they jumped on the Mona Lisa's button, so I would do System: Set Sequence to Sequence & Button.number)

    Then, I would check to see if the sequence was not empty (sequence <> ""), I would then check if the sequence equaled the correct sequence to unlock the level. (sequence = "1324") If it does, do your unlock and turn this group off so it doesn't accidental trigger again if they jump on the buttons.

    If it doesn't equal the full sequence, I would then check to see if it equals something other than the correct partial sequences (sequence != "1" and sequence != "13" and sequence != "132"). If it doesn't equal one of those, I'd turn on the red light and clear the current sequence.

    Basically:

    <img src="http://www.infinitepossibilitygames.com/demos/sequence/sequence.png" border="0" />

  • Meh. I can't get cocoonJS to run on my phone, neither the preview or compiled apx. Probably because of the phone itself is still running Froyo. I need a better phone.

  • Nice start! You've got a lot of potential with this one. Will follow development for sure.

  • https://www.scirra.com/tutorials/487/using-physics-objects-momentum-to-assign-damage

    Looks like the issue with the plus sign is only in the preview. Shows up ok in the code view. There's some minor wonkieness in the second equation where I used the code formatting, but otherwise everything looks like it works. Thanks for the workaround with the asterix!

  • Joannesalfa

    Yup. Rinse and repeat as needed. Anytime you've got actions that are the same you can use the for loop to save yourself 49 or so events and avoid Carpel Tunnel Syndrome...for a while at least.

  • Trt this:

    <img src="http://infinitepossibilitygames.com/demos/loop/loop.png" border="0" />

  • Out of curiosity, what are you going to be doing in each of those events? Is it something you might be able to use a function for, and therefore use a for loop?

  • I'm writing a math heavy tutorial which requires me to use the plus (+) and times/multiply (*) symbols, however since they are also being used as formatting marks (bold and italic) when I preview it's parcing these as attempts to format text.

    Needless to say, hilarity is ensuing. Tom is there a work around for this?