AllanR's Forum Posts

  • Toddler

    you need to "Add" a key to the dictionary before you can use "Set" to update that key's value to something else...

  • vijayrajesh

    well, I am sure that level of smoothness could be matched with some effort... The name of it (CurveTo) implies that it is calculating curves between mouse positions. My example below just draws from position to position, so it is not as smooth.

    This paint program was started by my son - he wanted to make a game where you draw your own weapon. I cut out the weapon parts (he had templates to trace and standard parts you could drop in, and then let you try it out).

    I made it draw in a random color, and added a small random amount to the line thickness to help smooth out the line a little.

    Use the scroll wheel to increase or decrease the pen thickness. The right mouse button erases, the left draws.

    (This requires ROJOhounds Canvas plugin).

    http://www.rieperts.com/games/forum/CanvasPainter.capx

  • artbava I added Physics to the ball and objects (that was the easiest way to make the ball bounce off of things). You can download the capx from the link above again to get the updated version.

    Blue objects can not move at all, green objects are dense and don't move much. Yellow objects are light and move easily...

    You will need to add Physics to any objects in your game that you want the ball to interact with. Since you are doing top-down, World Gravity needs to be 0. Your objects don't need the solid behavior (just Physics). Update objects Density, Linear Dampening, or other properties to make the ball interact the way you want...

    It runs well on my iPhone.

  • BlueStarbie you have the sprites on the BG layer instead of the Grounds layer... move them to the same layer as the Player1Box and it works.

    you might want to use the pin behavior, and you might want to think about using 1 event sheet for all the game levels so you don't have to duplicate code...

  • I did almost the same thing as blackhornet, but without the local variable, and used MOD (%) to see if score is at a multiple of 25... (MOD calculates the remainder of dividing score by 25. If there is no remainder then you know you have a multiple of 25.)

    I also moved updating Milestone to where the Score is increased (like blackhornet did), so that you don't have to worry about Trigger Once, and don't have code running every tick that doesn't need to run.

    http://www.rieperts.com/games/forum/Clickhah.capx

  • palmer Construct 2 can certainly do what you want - and it doesn't get any easier than C2 from what I have seen.

    C2 doesn't export swf files, but it does build HTML5 games that run in browsers.

    There is a learning curve to get over, but there are lots of templates to try, tutorials to read, and a very friendly and helpful community if you get stuck. Best of all, you can try the free version to see how it all works.

  • Vaank the first method was the way I was suggesting. It gives every empty space an equal chance of getting an enemy with one quick loop through the array.

    If you just randomly pick array.x and y locations, you would be picking non empty locations and occasionally be picking the same empty location, so it isn't going to be more efficient - unless your array is huge and you want relatively few enemies.

    The first method gives you the potential to set up your array to adjust the possibility for creating enemies in certain areas - you could use a range of numbers to influence where the enemies are: 0 means location is filled, 1 means empty but no chance of enemy, 2 = small chance, 3 = medium chance, 4 = high chance. You could also use different number ranges to indicate what types of enemies can be created in various areas...

    But, as always, there are many ways to do things - you just have to decide what works for you and gives you the result you want.

  • If you have approximately 100 empty tiles, and want about 10 enemies, then loop through the array and give empty tiles a 10% chance of having an enemy. (use Compare two values where the first value is Round(Random(10)) and the second value is 5, then create enemy at that tile location.

    if you want an exact amount of enemies, then keep looping through until the desired number have been spawned.

  • just add physics to the ground - and make it immovable.

  • Yes, the canvas plugin has an rgbaAt function that can be used to find the color at any point on the canvas object.

  • as a subevent under On Clicked,

    use System > compare two values, where first value is Button.IID

    and second value is the IID to look for (they start with 0, so you will have 0, 1, or 2)

  • Try Construct 3

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

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

    you could create an invisible "guide" sprite with image points spaced out a little wider than the sprites and pin the sprites to it. if that guide sprite has its origin in the middle, then that would be easy to place in the middle of the screen. Moving that sprite would then move the whole group...

    otherwise you would have to manually, sum up the widths of the sprites, and add in the distance you want between them and calculate where to place each one.

  • PolicyLobbyz22

    set your player's platform Y vector to -250 (or more if you want more of a bump.

  • if the levels share the same functionality and basic rules, then using one event sheet would make life much easier - especially if you want to make some minor change that would affect all levels.

    you could create groups on the main event sheet and disable any groups that may not apply to certain levels to cut down on unnecessary processing.